Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Write a complete Java program, including comments, to do the following: You are to write a program which will assign and print a bowler's ranking.

Write a complete Java program, including comments, to do the following: You are to write a program which will assign and print a bowler's ranking. The ranking will be based on scores received on three games played at Gil Hodges Lanes. You are to proceed as follows: a) Prompt the user to enter a given bowler's data from the keyboard. The data consists of the bowler's ID, and the bowler's scores in the first, second, and third games. The program should call these variables: id; game1; game2; and game3 respectively. The program should print the original information read to the monitor. A typical set of data could be 4321 185 250 201. b) Each game score entered is to be checked. If the score entered was negative, replace it by its positive equivalent (e.g., -75 becomes +75). If the score was greater than 300, subtract 50 from the score as many times as needed to bring the acore into the range 0..300. c) The bowler's ranking is to be calculated from the corrected scores. The average game score (a real number) will be computed on the following basis: the first game counts 25%, the second game counts 35% and the third game counts 40%. The program will call this value gameAvg. d) The program will then print the bowler's ID, the corrected game scores, the average game score (to 2 decimal places) and a one character ranking based on the bowler's average game score as follows: gameAvg -> ranking 251..300 -> P (for Professional) 201..250 -> E (for Excellent) 151..200 -> A (for Average) 101..150 -> B (for Beginner) 0..100 -> R (for Rookie) e) Repeat the entire series of operations for each successive bowler until all bowlers have been processed. Make it work for a variable number of bowlers. Count and print to the monitor how many bowlers have been processed. Use a sentinel to determine the end of the data set.

Step by Step Solution

3.34 Rating (145 Votes )

There are 3 Steps involved in it

Step: 1

Heres a complete Java program that fulfills the requirements you mentioned import javautilScanner pu... blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Ethical Obligations And Decision Making In Accounting Text And Cases

Authors: Steven Mintz

6th Edition

1264135947, 9781264135943

More Books

Students also viewed these Programming questions