Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

The Database Experts Guide To SQL

Authors: Frank Lusardi

1st Edition

0070390029, 978-0070390027

More Books

Students also viewed these Databases questions