Classwork 5

Racers
Write a Java program that shows ten oval “cars” racing across the screen from left to right.
Specifications
During this week, we will add the following features to the game:
    •    an array of cars, created with a loop, designed so that we can change one number in the code and instantly change the number of racing cars.
    •    random positive or negative acceleration applied to the cars every frame of animation, so they speed up and slow down as they are racing across the screen.
    •    a message that shows which racer is in the lead at all times
    •    a message that shows who won when the game ends
    •    a way for a human player to press a number key to speed up a chosen racer
 
Your final game should have at least the basic elements given above.
Submitting your work Electronically
When you are finished, you should submit your project for grading and update your course web portfolio.