Week 6

Monday

  • Recipe Card Check (attendance)

  • Assignment 2:
    • due: Monday, March 4 (before Spring break)
    • questions?

  • Review and Promises for Midterm
    • Handout: questions munged together from two of my old exams, to give you an idea what my exams look like, and what your exam will look like.
    • Promises:
      • 75 points / 75 minutes
        • budget your time one point per minute
        • we actually have 120 minutes for our lab, and we can run over if needed (time will not be an issue)
      • Open book / open notes
        • you may bring your book if you bought a copy
        • you may login to your CS accounts and view the book online in a browser
        • you may open DrRacket for the purpose of viewing the lecture notes, labs, and assignment
        • but you may not run any programs or use the Interactions Pane in DrRacket–you're on your honor!
      • 5 questions, 15 points for each question
        • Q1 Q1 (15 points) Follow the Design Recipe. Given a problem description, design a function following the steps of the Design Recipe: data definitions, signature, purpose statement, function header, tests (in the form of check-expect’s), function template, and finally, the finished function.
        • Q2 (15 points) You be the stepper. Given a function definition and function application, trace the evaluation of the function being applied. The function will contain a cond expression.
        • Q3 (15 points) define-struct. Given a structure definition: supply a corresponding data definition; provide two examples of this type of structure; name and give the signatures for the constructor, predicate, and selector functions automatically created; and create a template function for the given struture.
        • Q4 (15 points) Given a data definition with varieties and problem statement, write function(s) following the steps of the Design Recipe. This question will be similar to the course notes where we had an animal and varieties of animal including snake, dillo, and ant. But it may not be about varieties of animal. It might be about varieties of something else.
        • Q5 (15 points) Given a data definition for a list of numbers, design a function following the steps of the Design Recipe. This question will be similar to exercises you worked on in Lab 4.

Tuesday

  • Midterm 1

Wednesday