c++ prog 6
prog 6/~$AD FOR WHAT TO DO.docx
prog 6/players.txt
F Abe_Washington 63 180 3.77 3.9 F John_Smith 74 215 3.03 4.8 H Joe_Canada 69 175 2.44 18 25 33 F Jack_Sprat 77 260 2.85 4.2 V Jane_Doe 73 144 3.66 6 12 H Igor_Thugman 66 190 1.55 3 126 28 V IM_Spiker 75 150 3.20 2 18 H Skater_Bob 68 160 2.40 16 9 41 H T_KlingLing 72 220 1.98 20 10 62 V Jen_Fuller 67 130 3.98 5 8 H Jessie_James 70 170 3.05 18 4 52
prog 6/READ FOR WHAT TO DO.docx
Purpose
This program will provide an opportunity to solve a problem related to two-dimensional arrays.
Specifications
Write a program that will manage a sports recruiting operation. Your goal is to examine athletes from three sports and select those with special attributes for further consideration. This implies use of four classes: one for general player attributes and methods, and then one for each targeted sport. Utilize inheritance to define the three specialized classes from the one general class.
|
Class |
Purpose |
Data Members |
|
Player |
Store general information about one athlete. |
Name, height, weight, GPA |
|
FootballPlayer |
Manage information related to a potential football recruit. |
Attributes of Player plus • 40 yard dash time |
|
VolleyballPlayer |
Manage information related to a potential volleyball recruit. |
Attributes of Player plus • Service aces per game • Kills per game |
|
HockeyPlayer |
Manage information related to a potential hockey recruit. |
Attributes of Player plus • Goals per season • Penalty minutes per season • Plus-minus number |
Feel free to include set/get functions only as needed, but include at least one constructor per class.
Your program is mainly designed to identify players for serious recruiting if they have all of the attributes from a list. The following table describes what players should be identified:
|
Class |
Target Attributes |
|
Any Player |
Must have a GPA of at least 2.3 (this function should reside in the Player class). |
|
FootballPlayer |
Height over 73 inches and weight over 190 lb 40 yard dash time under 4.7 sec |
|
VolleyballPlayer |
Height at least 70 inches At least 6 service aces per game At least 9 kills per game |
|
HockeyPlayer |
At least 15 goals per season Less than 12 penalty minutes per season Plus-minus number greater than 18 |
The functions for specifically assessing a target candidate for the individual sports should reside witchin the respective class.
· Game code (F, V, or H), name, height (inches), weight (pounds), GPA
Beyond these, additional data items will be included for each type of athlete:
· Football: 40 yard dash time.
· Volleyball: services aces per game, kills per game.
· Hockey: goals per season, penalty minutes per season, plus-minus number.
Your program should determine what type of athlete the data represents, and then read the subsequent related attributes of the athlete. Store the information in the appropriate type of object (for football, volleyball, or hockey). Then, invoke a virtual function isCandidate() created using polymorphism to determine if a player is a candidate for further recruitment.
There will not be a need to work with an object of the superclass you create for all players. Its purpose is to simply provide a means of definition common information and functionality for all types of athletes.
Your output should simply be a list of names followed by the sport name for which you are targeting them.
USE COMMENTS!!!!
Deliverables
Deliver the following as your final product:
· Cover page with assignment name, student name, and list of attachments
· Printed copy of all final source code files (.cpp and/or .h files)
· Printed Output processing all inputs in the provided data file