CSSE 120 — Introduction to Software Development, Robotics

Homework 3

Reminder: for each class session and associated homework:

  • Where you do your work:
    • In Eclipse in the project that you checked out for that session.
    • Paper and pencil quizzes that you receive in class (but can also access from the homework assignment).
  • If you have questions: Email csse120-staff@rose-hulman.edu.
  • Best place and time to do the homework:
    CSSE lab (Moench Hall, room F-217)
    7 p.m. to 9 p.m.
    Sunday — Thursday.

  1. There is no reading for this homework, but you might want to review Chapter 4 — your choice.
  2. Do the TODO's in ALL the modules of today's project, if you did not complete them in class.
    • Today's project was: Session03_LoopsAndUsingObjects
    • For the rectangles function of m4_using_objects_practice, here are some hints:
      • If you construct a zg.Rectangle before the loop, and if that is the only zg.Rectangle that you construct, then only one zg.Rectangle will appear on the screen at any given time. It may move around, but it is the only zg.Rectangle, in this case.
      • The rectangles function requires that you draw many zg.Rectangles, all at the same time. So it MUST be the case that the statement
            r = zg.Rectangle(...)
        
        needs to be INSIDE the loop.
      • Consider doing some arithmetic on the loop variable to get the different zg.Rectangles to be at different places.
      • Do try this problem, but if you don't get it, no problem — we will discuss the ideas in this problem in much more detail in a future session.
    • The Course Schedule page has links to documentation on zellegraphics.