Home / Expert Answers / Computer Science / write-an-interactive-program-that-prints-out-a-table-showing-race-results-from-the-lone-survivor-end-pa258

(Solved): Write an interactive program that prints out a table showingrace results from the Lone Survivor End ...



Write an interactive program that prints out a table showing race results from the Lone Survivor Endurance Race.  The table will list the racer's number, name, number of laps completed, total miles completed, base lap winnings, mileage bonus, and net winnings. There are also grand totals at the bottom of the table.

 

1. The program will collect and display data for the top three racers. 2. All racers claim a winning of $22.00 per lap completed. 3. The program will ask for the racer's first name and last name.  Users will be able to enter names using any combination of upper and lower case letters. The name will then be displayed in the table using all lowercase letters in the table.

4. Each racer will be assigned a racer number made up of a random number between 1 and 5000.

5. The prgram must also ask for the number of laps completed (in increments of a whole lap)

6. If the racer completes more than 50 miles, any miles over 50 pay a bonus of $12.00 per mile

7. The distance of each lap is 8.5 miles. The bonus for any miles over 50 is $12.00. Each racer earns winnings of $22.00 per lap. The entry fee each racer pays is $100.00. These must be named constants in your program

8.  Dollar amounts must be displayed in format with dollar signs and two decimal places.

 

Sample Program Run (user input in bold):
Welcome to the Lone Survivor Endurance Race!
Please enter the racers first name: Sp

Sample Program Run (user input in bold): Welcome to the Lone Survivor Endurance Race! Please enter the racer's first name: Speedy Please enter the racer's last name: Sam Please enter the number of laps completed: 10 Please enter the racer's first name: Tortise Please enter the racer's last name: Terry Please enter the number of laps completed: \( \mathbf{5} \) Please enter the racer's first name: Enegizer Please enter the racer's last name: Erin Please enter the number of laps completed: 20 Lone Survivor Endurance Race Results Iotal Miles Covered: \( 297.5 \) Total Base Winnings: \( \$ 770.00 \) Total Bonus Winnings: \( \$ 1,860.00 \) Total Net Winnings: \( \$ 2,430.00 \)


We have an Answer from Expert

View Expert Answer

Expert Answer


 Since no programming language was specified, i choose java: Prerequisite: There is an error in the given output above at last line, if the user is getting a bonus, he is not required to pay enterance fees and

We have an Answer from Expert

Buy This Answer $5

Place Order

We Provide Services Across The Globe