Question: 1 . Implement the Car class in the Programming Challenges # 6 . 2 . In addition: a . Set the maximum speed to 1

1. Implement the Car class in the Programming Challenges #6.2. In addition:
a. Set the maximum speed to180 and the minimum to 0.(180 is to be defined as static final int)
b. Override the toString() method for this class. It will return a Car as: ""
Where #### is the cars yearModel, $$$$$$$$$$$$$$$ is the make, ### is the current speed, respective. The
dots are spaces.
2. Write an application named RacingCarApp that will do the following:
a. Instantiate an array of 8 Cars of your choice.
b. Loop 30 times and in each loop for each car, generate a random number between 1 and 20, if the number
is between 1 and 15, then the car will accelerate otherwise brake.
c. Output the final status of each car.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!