Week 5

Monday

  • Recipe Card Check (attendance)
  • Assignment 1:
    • due: Friday, October 6 (before October break)
  • Lab 3 recap


Sunset with plane

  • keeping track of three numeric values in a triple struct


Unions

  • Lecture 8: Mixing it all up
    • mixing different kinds of data in data defs

Wednesday

  • Recipe Card Check
  • Review and Promises for Midterm
    • Handout: one of my old exams, to give you an idea what they look like
    • Promises: Not Finalized Yet!
      • 75 points / 75 minutes
        • okay, maybe longer, but we must give up the classroom in time for the next class!
        • budget your time one point per minute
      • Open book / open notes
        • since our book and notes are on the computer, and we're trying to save paper…
        • you may login to your CS accounts and view the text 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!
      • 4 or 5 questions, points for each question will be indicated
        • Q1 Q1 (xx 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 (xx 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 (xx 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 (xx points) Given a data definition and problem statement, write a function(s) following the steps of the Design Recipe.
          • This question may involve a “wish list” (helper) function from following the Design Recipe.

Thursday

  • Midterm 1