Week 6

  • Midterm Exam this Friday
    • use your email address to login
    • Review this Wednesday (sample exam and solutions already posted)
  • Assignment 2:
    • due: next Monday, March 29
    • questions?

  • Lecture 7: (cont'd from slide 36)
    • Lists (aquarium of fish)
  • Review and Promises for Midterm
    • Fall 2019 midterm: PDF
    • solution: exam1-sols.rkt Revised with templates for Problem 4!

  • 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 access our textbook online
      • you may access any of our course pages online
      • you may open DrRacket for the purpose of viewing the lecture notes, labs, and assignments
      • but you may not run any programs, use the Stepper, or use the Interactions Pane in DrRacket–you're on your honor!
    • 4 questions, points for each question indicated below
      • Q1 (20 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 (16 points) define-struct. Given a data and structure 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 structure.
      • Q4 (24 points) Given a data definition with varieties and a 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. It will be even more similar to the shape data definition with varieties on the practice exam.
        • note: Design Recipe steps I will ask you to provide include: signature, purpose statement, and header; template; and function body. (on the practice exam I didn't ask for template, but I think it will help you with partial credit, as well as with the function body)
  • Midterm 1