Question: In this homework you will be making 1 base class and 2 derived classes. in c++ You will have a base class of Employee. An

In this homework you will be making 1 base class and 2 derived classes. in c++

You will have a base class of "Employee".

An employee has a name (string) and employee id (integer)

You will have 2 subclasses.

One which is salary employee. They have a yearly salary (float)

Another which is an hourly employee. They have "per hour" (float) and hours (int).

Both have a function called "int nextMonthPaycheck()" that calculates pay for a month.

For all variables, have set, get and display functions.

You will be submitting 7 files

employee.h and cpp

salary h.cpp

hourly.h and cpp

main.cpp

Remember to use the preprocessor trick on the header files

In main -- Assume there are 10 employees. using the appropriate class, ask the user their name, their ID#, if they are salary or hourly. Ask the appropriate questions (salary, or hourly and hours) for all 10 employees.

Then, in a table, display their name, id# and salary for the month.

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!