CS110 Introduction to Computing
Spring 2006

Assignment#5: Daisy Daisy, Give me your answer do!
Due in class on Tuesday, March 28, 2006

Based on the song, Daisy Bell, you will implement a Daisy whose petals can be plucked...giving an answer each time!

What to do: Read the entire Chapter 6 from Sanders & van Dam and make sure you understand the concepts of integers, booleans,and if-statements . Your task is to follow the steps in Section 6.4 to implement the Daisy application. After you have replicated the example from the Chapter, modify the program to draw a more realistic looking Daisy (using rotated ellipses) as shown in the picture above.

Notes:

  1. Be sure that you have carefully read and understood the concepts covered in Chapters 6 of Sanders & van Dam and also the class notes.
  2. Define a new constructor for the Petal class that takes the (x, y) location as well as the rotation angle for the petal. Use this constructor to create the petals.

Hand in: A prinout of the final version of the Java program from above. Also, include a prinout of the picture produced by your program. Conclude your work by a short essay (just a few sentences) on your thoughts about your understanding of the Java programming concepts you have learned so far.

Also: As soon as you are successfully done, send an email to Deepak telling him that you were able to successfully complete your assignment.


Back to CS110 Spring 2006 Materials.