Programming Homework Help

Speed in MPH Java Programming Project

 

You are asked to manage a drag race between two racers by recording the drag speed in MPH for each of the players in two separate arrays. The first array is for Player1 and the second array is for Player2. A full competition consists of 5 races. The racer with the highest average speed wins.

What to do?

-declare an array of double for each of the two racers.

-code a function that record the speed for each race.

-code a function that display the outcome for each racer and for each race.

-when the 5 races are finalized, call a function to calculate the average speed for each racer.

-and finally, determine the winner (racer with highest average speed).

Extra credits:

Allow to repeat for another competition (another 5 races) and repeat the process from before. 

It’s can be joptionpane or normal system.out.println format