CST 112 Final Exam
Modify your Project #4 code
to use arrays of Object.

Make a copy of your Project #4 code; modify it as described below.
Store your final code in a new file named "q4.pde" by 5pm Tuesday 5/19.


M O D I F I C A T I O N S

(1.) Increase the number of Racers from three to five.
You will also need six buttons and four varmits.

(2.) Add markers across the tracks,
Use a while loop to display the lines and triangles,
as shown in this screen-shot:

Specifications for p4 are summarized below.
These specifications should apply for arrays of objects in q4.
Define and use these object classes:
  • Button
  • Racer
  • Varmit .
Properties should be defined within the object class.
(Global variables should not be used within the class.) .
    Racetrack:  
    A racetrack with three five parallel tracks (horizontally).
    Racers:  
    In each track, a racer moves (a random amount) when its button is clicked. Each racer is a different color, and drawn with at least three shapes.. Buttons:  
    Buttons are used to make the racers move:
    Each button must be the same color as its corresponding racer and display the name (or number) of that racer,
    An additional button moves ALL three five Racers.

    Varmits:  
    After the race begins, two four small varmits run back and forth between the tracks (bouncing off the ends).

    Animation:  
    Racers and Varmits should all display some sort of animation, as they move.

    Messages
    The title and author must appear on the screen.
    When a racer crosses the finish line, the winner's name (or number) is displayed.