Date Assigned: Monday, March 17, or Tuesday, March 18, 2008.
Due Date: Wednesday, April 2 (no class on Monday, March 31), or Tuesday, April 1, 2008, before the beginning of your lab section.
Objective: The main objective of this assignment is to learn to use arrays.
Programming assignment: To celebrate the fact that the Miners are the 2008 Women’s Basketball Conference USA Champions, the athletics department is automating its record-keeping so that sports statistics may be publicized more easily. They would like you to write a Java application which computes the average number of points per game scored by each individual player during the season. A file contains the name of each player on the team, the number of points scored in the last game, and the total number of points scored by that player up until the last game. The format of the file is as follows:
· The first line contains the first player’s name;
· The second line contains the points scored by the first player in the last game;
· The third line contains the points scored by the first player up until the last game.
· The fourth line contains the second player’s name;
· The fifth line contains the points scored by the second player in the last game;
· The sixth line contains the points scored by the second player up until the last game;
· and so on…
Assume that the number of players does not exceed 20. Your program must read the file, and store each type of data (player’s name, number of points in the last game, number of points up until the last game) in separate arrays. Then, your program must compute and display the name of each player and the average number of points scored per game by that player during the whole season. The average is computed by summing all of the points for the season and dividing by the number of games, which was 30.
Homework assignment: on a separate sheet of paper, solve Ex. 2 and 4 at the end of Chapter 9 (on pp. 598 and 599). For extra credit: Ex. 10 on p. 602.
Deliverables: as instructed by your TA.