Today we’re going to spend some time reviewing imperatives to set the stage for the idea of object-oriented programming. This is a design approach to programs that essentially involves the idea that “everything is a struct!” That means we need to be super clear on all of our new struct abilities since we started working in #lang htdp/asl.

Then towards the end of class, we’re going to introduce a new data structure as a preview to the sorts of things you’ll be doing in future CS classes (particularly CS 214). For those of you who have programmed before you may have used a dictionary which stores key-value pairs. For instance my "favorite color" (key) is "green" (value). While some languages call this a dictionary, in ASL, it’s called a HashMap. We’ll dig into the details of how these work and also talk about why we bother having multiple different ways of storing similar data.


Today's Resources

1. Exercise Files

Download Exercise Files

2. Slides

3. Pre-Recorded Lecture Video(s), Mini-Quizzes, and Live Recordings

Available Videos
Link Title Type Duration
Video 0 Live Lecture lecture 50:00

4. Mini-Quiz 16: Imperatives and HashMaps

If you did not participate in class or were unable to attend then you should use this Canvas Quiz as a substitute.