CS111 Lab 7 Solutions

 

Tara the BagelThrower's JEM

Solutions to the programming problems in lab 7 are presented by first answering the following five questions and then writing the actual code for the problem.

  1. How is the pattern drawn?
  2. What is the base case?
  3. How are consecutive calls to the pattern different?
  4. How do we move into position to draw the next pattern call?
  5. How do we meet the invariant, if any?

The questions are explained in more detail in the Lab 7 description.

Solution code for the problems are available in the lab_solutions/lab7_solutions folder in the cs111 download directory on cs.wellesley.edu.

  1. BoomerangWorld
  2. EiffelWorld
  3. InvertedTriangleWorld
  4. NestedWindowWorld
  5. NestedPolygonWorld
  6. ConcentricRugWorld