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.

Sportsman firstName, lastName matches Played computeAve() Footballer Team/Club Goals Position Bowler Type

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

1 Expert Approved Answer
Step: 1 Unlock

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

blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!