Question: Implement the following class hierarchy in C++. Write a driver to test the hierarchy by displaying data of your favourite players. Requirements: Program should be
Implement the following class hierarchy in C++. Write a driver to test the hierarchy by displaying data of your favourite players.
Requirements:
- Program should be well designed using object-oriented concepts learned so far.
- computeAverage () function is used to calculate the average goals/score of the players.
- Data should be displayed by overloading > operators.
- You are allowed to add appropriate data members and functions in the classes as required.
Use a text file to read data of your favourite 10-15 players.
Sportsman firstName, lastName matches Played computeAve() Footballer Team/Club Goals Position Bowler Type Wickets Cricketer Team Runs Batsman Centuries Allrounder CRICKET
Step by Step Solution
3.46 Rating (159 Votes )
There are 3 Steps involved in it
Solution include include include include include using namespace std class Sportsman protected string FirstName15 string LastName15 double MatchesPlayed15 public Sportsman FirstName1 Malik LastName1 Z... View full answer
Get step-by-step solutions from verified subject matter experts
