Question: Using c++ language and plz answer the extra credit part, thank you! Playing Games The sporting world is full of athletes that play games. There

Using c++ language and plz answer the extra credit part, thank you!

Using c++ language and plz answer the extra credit part, thank you!

Playing Games The sporting world is full of athletes that play games. There are all types of athletes, including those that play baseball, basketball, football, and soccer. Every athlete has the following characteristics: 2. Constructor (accepts values for name and salary) Name (type string) Salary (type double) For name and salary, implement the accessor and mutator functions. In addition, implement the following function: double salaryPerGame() Keep in mind that baseball players play 162 games (in Major League Baseball), basketball players play 82 games (in the NBA), football players play 16 games (in the NFL), and soccer players play 38 games (at least in the English Premier League). Once vou've created a base class for the athlete and derived classes for each of the 4 types of athletes, write a driver (test) program which shows salaries for each of the 4 types of athletes. EXTRA CREDIT (5 points): Write a function printSalary that is not a class function, but will be a polymorphic function that takes in a base class argument

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock 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 Databases Questions!