(Solved) : Objective Main Purpose Assignment Practice File Input Output 1 0 Programming Assignment C Q41339625 . . .

Objective The main purpose of this assignment is to practice with file input and output (1/0). Programming Assignment CMU col

Sample Output Name Scores Average 15 18 16 16.33 Burch Watson Winorburg 13 14 14 23 20 16.80 [name] has the highest average s

Objective The main purpose of this assignment is to practice with file input and output (1/0). Programming Assignment CMU college basketball team has certain number of players, each of whom played games in the current season. The team information is stored in the file BasketballData.txt. The file contains information of one player per line, with the following format: player’s lunt name followed by scores separated by spaces, followed by a sentinel value . The number of sames that each player may play is between 0 and 5. For example, the file may contain 15 18 16 -1 Burch Watson Winorburg 13 14 14 23 20-1 Tt indicates that Burch played three games and scored 15, 18, and 16 points, respectively: Watson played no game; and Winorburg played all five games and scored 13, 14, 14, 23 and 20 points and so on. Write a Java program to read information from the file (BasketballData.txt) using a Scanner object, and write the output to another file (Basketball Team.txt) using a Print Writer object. The output file should contain the original data (one line for each player, without -1) along with the player’s average score of the season, and announce who is the highest average-scoring player of the team. The average scores should be kept 2 decimal digits. In addition, each column should be aligned correctly using the printf method and appropriate format specifiers. Sample Output Name Scores Average 15 18 16 16.33 Burch Watson Winorburg 13 14 14 23 20 16.80 [name] has the highest average score (score]. Show transcribed image text Objective The main purpose of this assignment is to practice with file input and output (1/0). Programming Assignment CMU college basketball team has certain number of players, each of whom played games in the current season. The team information is stored in the file BasketballData.txt. The file contains information of one player per line, with the following format: player’s lunt name followed by scores separated by spaces, followed by a sentinel value . The number of sames that each player may play is between 0 and 5. For example, the file may contain 15 18 16 -1 Burch Watson Winorburg 13 14 14 23 20-1 Tt indicates that Burch played three games and scored 15, 18, and 16 points, respectively: Watson played no game; and Winorburg played all five games and scored 13, 14, 14, 23 and 20 points and so on. Write a Java program to read information from the file (BasketballData.txt) using a Scanner object, and write the output to another file (Basketball Team.txt) using a Print Writer object. The output file should contain the original data (one line for each player, without -1) along with the player’s average score of the season, and announce who is the highest average-scoring player of the team. The average scores should be kept 2 decimal digits. In addition, each column should be aligned correctly using the printf method and appropriate format specifiers.
Sample Output Name Scores Average 15 18 16 16.33 Burch Watson Winorburg 13 14 14 23 20 16.80 [name] has the highest average score (score].

Expert Answer


Answer to Objective The main purpose of this assignment is to practice with file input and output (1/0). Programming Assignment CM…