1. Engineering
  2. Computer Science
  3. need code in c please include a separate...

Question: need code in c please include a separate...

Question details
- need code in C++
- Please include a separate header file
- requirements in the picture

1. The program needs a Frisbee Golfer class 2. Use the class to find the Frisbee golfer average. 3. Class should have such public methods that return the golfers name or the golfers ID, and include methods that can set ID and golfers first and last name. 4. Prompt the user for the name for the golfer, the total number of games and the total number of tosses for two golfers 5. After Information from the user has been validated, create an object for the golfer. a. Have the program assign each golfer an ID. b. Internally the class should track the total number of tosses for all games and the total number of games. b. The players average will be calculated using the total tosses and total number of games 6. Add the scores for at least one additional game per player. 7. Display each players name, id, and average. Be sure to include in your program: - An appropriate header comment, - A constructor for the Golfer Class that receives a Name, ID, Total Tosses, and number of games. Validate tosses and games to ensure no negative numbers. Provide Accessor/Get Methods that will return Name, ID, Total Tosses, Number of Games, and Average (tosses per game) Provide Mutator/Set Methods that will be able to change a previously recorded Golfers, Name and ID. Nothing else. . Provide Method AddScore that will add a number of tosses for another game. (Validate tosses for no negative numbers.)
Solution by an expert tutor
Blurred Solution
This question has been solved
Subscribe to see this solution