|Design a Java class with a main method that does the following. You must include a meaningful comment for main and each method
|Design a Java class with a main method that does the following. You must include a meaningful comment for main and each method
Computer Networking: A Top-Down Approach (7th Edition)
7th Edition
ISBN:9780133594140
Author:James Kurose, Keith Ross
Publisher:James Kurose, Keith Ross
Chapter1: Computer Networks And The Internet
Section: Chapter Questions
Problem R1RQ: What is the difference between a host and an end system? List several different types of end...
Related questions
Question
100%

Transcribed Image Text:6. Design a Java class with a main method that does the following. You must include a meaningful
comment for main and each method
a. Main invokes a method readScores to read input from a file (name of your choice) that
contains the name of the bowlers (no more than 25) and their bowling scores (two scores
per bowler). The program stops reading values when it has reached the end of the file.
For example, the file might contain:
Bob 203 176
Jane 210 253
Jack 300 189
Eileen 220 298
• As the method reads the data, it stores the name into a String array and the average
of the two bowling scores into an array of double.
• The method returns the actual number of bowlers read in
b. Main then invokes a method computeOverallAvg to:
compute (a) the overall average score of all the bowlers combined, (b) the average
score and name of the bowler with the highest average score and (c) the average
score and name of the bowler with the lowest average scores.
print to the console (a) the overall average score, (b) the name and average score of
the bowler with the highest average score and (c) the name and average score of the
bowler with the lowest average score. Average scores should appear with two
decimal places.
• The method receives an array of double, an array of String and the number of
records read in by readScores
c. Main invokes a method doParallelSort where the primary sort is the average score in
descending order (highest to lowest) and the bowlers' names are synched with the averages
The method receives an array of String, an array of double and the number of
records read in by readScores
d. Main then prints to a file (name of your choice) the values of the sorted arrays - primary order
is average score (with two decimal places) in descending order with bowler name next to it. A
heading should appear above the scores and names which is aligned with the data. For
example,
Score
Bowler
259.00
Eileen
244.50
Jack
231.50
Jane
189.50
Bob
Expert Solution

This question has been solved!
Explore an expertly crafted, step-by-step solution for a thorough understanding of key concepts.
Step by step
Solved in 3 steps

Recommended textbooks for you

Computer Networking: A Top-Down Approach (7th Edi…
Computer Engineering
ISBN:
9780133594140
Author:
James Kurose, Keith Ross
Publisher:
PEARSON

Computer Organization and Design MIPS Edition, Fi…
Computer Engineering
ISBN:
9780124077263
Author:
David A. Patterson, John L. Hennessy
Publisher:
Elsevier Science

Network+ Guide to Networks (MindTap Course List)
Computer Engineering
ISBN:
9781337569330
Author:
Jill West, Tamara Dean, Jean Andrews
Publisher:
Cengage Learning

Computer Networking: A Top-Down Approach (7th Edi…
Computer Engineering
ISBN:
9780133594140
Author:
James Kurose, Keith Ross
Publisher:
PEARSON

Computer Organization and Design MIPS Edition, Fi…
Computer Engineering
ISBN:
9780124077263
Author:
David A. Patterson, John L. Hennessy
Publisher:
Elsevier Science

Network+ Guide to Networks (MindTap Course List)
Computer Engineering
ISBN:
9781337569330
Author:
Jill West, Tamara Dean, Jean Andrews
Publisher:
Cengage Learning

Concepts of Database Management
Computer Engineering
ISBN:
9781337093422
Author:
Joy L. Starks, Philip J. Pratt, Mary Z. Last
Publisher:
Cengage Learning

Prelude to Programming
Computer Engineering
ISBN:
9780133750423
Author:
VENIT, Stewart
Publisher:
Pearson Education

Sc Business Data Communications and Networking, T…
Computer Engineering
ISBN:
9781119368830
Author:
FITZGERALD
Publisher:
WILEY