Week 13
Higher Order Functions / Midterm II (and Review)
Monday
- Midterm Exam II this Friday
- Gradescope: https://www.gradescope.com/
- use your email address to login (same as for Midterm I)
- this will be the last exam of the semester!
- Review this Wednesday
- Lecture 15: Filter, Map, Fold
- Assignment 5: Simple Tetris
- due: Mon, May 24, 11:59pm (last day of classes)
- absolute deadline for all outstanding work: Thu, May 27, 11:59pm (end of Study Period)
- demo and overview of starter code
Wednesday
Exam Promises for Midterm II
- Handout(s): old exam(s)
- Exam Promises for Midterm 2
- 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!
- Exam is cumulative, but with an emphasis on the material covered since the first midterm
- Lectures 7–14
- HtDP/2e Parts:
- II Arbitrarily Large Data
- III Abstraction
- IV Intertwined Data
- Topics:
- lists, list abbreviations
- functions that consume lists, functions that consume multiple lists
- binary trees (e.g., rumor mill, pipeline), and functions that consume them
- intertwined data, mutually referential data definitions, mutually recursive functions (e.g. more realistic rumor mill, files and directories), and functions that consume intertwined data
- abstracting over similar functions, higher order functions
- 5 questions, 15 points each
- Q1 Russian Dolls question based on HtDP/2e Section 9.4
- You will be asked to write a function that consumes a Russian Doll (RD).
- Even though this may seem to be something completely different, the Data Definition for a RD is really a thinly-veiled list! Design Recipe.
- Q2 Multiple Lists Function. You will be asked to write a function that consumes two lists. Based on Lecture 9, Multiple Complex Inputs. I'll even promise you it will be of the second variety (
parallel-sum
was an example of this variety).- The question I ask you to write will be a variation of the question on the sample test.
- Q3 Binary Tree Function. I provide the data definition, you write the function. Design Recipe.
- I will even promise you it will be the same definition of a binary tree as on the sample test, but…
- The function I will ask you to write will be different.
- Q4 Function based on intertwined data: This question will be based on the data definitions for Files and Directories, from Lecture 12. I provide the data definition, you write the function(s). Recall: for intertwined data, when you are asked to write a function, you actually write multiple functions, one for each data definition. Design Recipe.
- Again, the function(s) I ask you to write will be a variation of the function on the sample test.
- Q5 Abstraction over and parameterizing similar functions. I will give you two very similar functions (like
big
andhuge
were similar in Lecture 14). This question will be very similar to Question 2 from the sample final exam (but not including the last part involving alambda
expression).
Friday
- Midterm II