Due Date: midnight, Friday, 21 September.

This assignment focuses on graphics from Chapter 4.

Submit the following programs via Blackboard:

  1. Write a program that displays a graphic display with your initials. Your display should contain at least two letters and 5 different graphic objects. If your initials consist of very few lines (for example, if they were II), add extra decoration to the display so that you use 5 different graphics objects.
  2. Write a program that show a ball moving across the screen. The user should click on the screen for the starting point, and the ball should move from top to bottom across the screen for 1000 iterations of a loop.
    • To slow down the movement so that it can be seen, include in your loop, the command time.sleep(0.1) (also include the statement import time at the top of your program).
    • If the user chooses a point close to the rightmost edge of the window, the ball will move out of view.
  3. Write a program that shows a small ball that slowly grows to fill the entire screen. Use the setFill() to set the ball to your favorite color and the time.sleep(0.1) (explained above) to slow down the growth so that it can be seen by the user.
  4. Modify the bouncing ball example from Lab 3 so that the ball bounces a little bit less each time. At the end, it should appear to roll across the x-axis.
  5. Chapter 4, #9 (draw a rectangle from clicks)
For more information on using Blackboard, see the first lab.

General Notes