Question: Learning Objectives: Developing a small application using Object-Oriented Design, including use of Classes and Objects. Use of Partial Arrays to store data Searching and Sorting





Learning Objectives: Developing a small application using Object-Oriented Design, including use of Classes and Objects. Use of Partial Arrays to store data Searching and Sorting of arrays. - Reading data from and writing data to a text file General Description Write an application that allows the user to enter, view, search and sort statistics on a team of basketball players. The program should start by reading data from a file called "bballin.txt", and should end by writing data to a file called "bballout.txt" A Statistic (stat) in the program consists of two numbers number of points made - number of points attempted A percentage is calculated with the formula (100 made)/attempted, rounded off. When the points attempted is zero, the percentage is zero Percentages are printed in the format mm/aa (nnn%) where mm is the points made, aa is the points attempted, and nnn is the percentage [note: always length 12]. Examples: 0/ 0 12/12 5/10 ( 08) (100%) ( 50%) A Player has the following data kept name jersey number - number of games played (max 15) - [note: this number will be the same for all players] and three lists of stats, one stat per game per list: 3-point field goals 2-point field goals free throws - Other data can be calculated from these stats: A stat of the overall 3-pointers (sum of 3-pointers made/attempted in all games) A stat of the overall 2-pointers (sum of 2-pointers made/attempted in all games) A stat of the overall free throws (sum of free throws made/attempted in all games) 3-pointers-made *3 2-pointers-made *2 + free-throws-made arrot, Carl [45] A list of total points scored, one for each game, calculated as: - Printing a report for a player should look like this example. The name is "as is" read from the file The jersey number is in square brackets. Game 3-Point FGs 2-Point FGs Free Throws Total 5/ 6 ( 83%) 18/22 ( 82%) 5/ 6 ( 83%) 1 3/ 4 ( 75%) 19/35 ( 54%) 3/ 4 ( 75%) 2 10/11 (91%) 22/30( 73%) 10/11 (91%) ALL 18/21 (86%) 59/87(68%) 18/21(86%) 56 50 190 Learning Objectives: Developing a small application using Object-Oriented Design, including use of Classes and Objects. Use of Partial Arrays to store data Searching and Sorting of arrays. - Reading data from and writing data to a text file General Description Write an application that allows the user to enter, view, search and sort statistics on a team of basketball players. The program should start by reading data from a file called "bballin.txt", and should end by writing data to a file called "bballout.txt" A Statistic (stat) in the program consists of two numbers number of points made - number of points attempted A percentage is calculated with the formula (100 made)/attempted, rounded off. When the points attempted is zero, the percentage is zero Percentages are printed in the format mm/aa (nnn%) where mm is the points made, aa is the points attempted, and nnn is the percentage [note: always length 12]. Examples: 0/ 0 12/12 5/10 ( 08) (100%) ( 50%) A Player has the following data kept name jersey number - number of games played (max 15) - [note: this number will be the same for all players] and three lists of stats, one stat per game per list: 3-point field goals 2-point field goals free throws - Other data can be calculated from these stats: A stat of the overall 3-pointers (sum of 3-pointers made/attempted in all games) A stat of the overall 2-pointers (sum of 2-pointers made/attempted in all games) A stat of the overall free throws (sum of free throws made/attempted in all games) 3-pointers-made *3 2-pointers-made *2 + free-throws-made arrot, Carl [45] A list of total points scored, one for each game, calculated as: - Printing a report for a player should look like this example. The name is "as is" read from the file The jersey number is in square brackets. Game 3-Point FGs 2-Point FGs Free Throws Total 5/ 6 ( 83%) 18/22 ( 82%) 5/ 6 ( 83%) 1 3/ 4 ( 75%) 19/35 ( 54%) 3/ 4 ( 75%) 2 10/11 (91%) 22/30( 73%) 10/11 (91%) ALL 18/21 (86%) 59/87(68%) 18/21(86%) 56 50 190
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
