Computer Science 15-100 (Sections T & U), Fall 2007
Homework 2
Due:  Thu 13-Sep-2007 at 3:00pm (no late submissions accepted).

Note:  If you will not be attending Thursday's optional lecture, you still must submit your assignment by 3pm that day.  Remember:  you can drop off your written submission at Angie Brookins' office (http://www.cs.cmu.edu/~angieb/), and you can email your electronic submission to your CA, and you can do this any time prior to the deadline and not just at the last minute!



  1. Read L&L Chapter 2.
     
  2. Study the Key Concepts and the Self-Review Questions and Answers in Chapter 2.  Do not submit these.
     
  3. Do the following Exercises from Chapter 2:
    Exercises 2.3 - 2.11, 2.17 - 2.18.
     
  4. Do the following Programming Projects from Chapter 2:
    PP 2.2, 2.5, 2.6, 2.7, 2.9, 2.17, 2.18, 2.19, 2.20.
     
  5. Write a program that uses the drawing methods we have covered to draw each of the following flags.  Important note:  the flag must fill the entire window, even as the window is being resized by the user.  In this case, you may get dimensions that make the flag look peculiar, but nonetheless it should adjust reasonably to the window's dimensions.
    1. Hungary

       
    2. Iceland

       
    3. Macedonia

       
    4. European Union
      Note:  here, you may replace the stars with yellow circles -- the point is for you to use trigonometric functions to determine the centers of the star-circles.

       
    5. BONUS (optional):  Australia
      Note:  Here, you do have to draw the stars for full credit, but you can draw circles for stars for less bonus.

       
    6. BONUS (optional)::  Micronesia
      Note:  here, you must draw the stars, and they must be properly rotated

Carpe diem!