Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Please solve this problem so that the result is the same as the uploaded picture. Design a class named Employee. The class should keep the

Please solve this problem so that the result is the same as the uploaded picture.

Design a class named Employee. The class should keep the following information in member variables:

Employee name (string)

Employee number (string)

Hire date (string)

Write one or more constructors and the appropriate accessor and mutator functions for the class. Next, write a class named ProductionWorker that is derived from the Employee class. (5 points)

The ProductionWorker class should have member variables to hold the following information:

Shift (an integer)

Hourly pay rate (a double)

The workday is divided into two shifts: day and night. The shift variable will hold an integer value representing the shift that the employee works. The day shift is shift 1 and the night shift is shift 2.

Write one or more constructors and the appropriate accessor and mutator functions for the class. (5 points)

- In a particular factory, a team leader is an hourly paid production worker who leads a small team. In addition to hourly pay, team leaders earn a fixed monthly bonus. Team leaders are required to attend a minimum number of hours of training per year. Design a TeamLeader class that inherits from the ProductionWorker class you designed up. The TeamLeader class should have member variables for the monthly bonus amount, the required number of training hours, and the number of training hours that the team leader has attended. Write one or more constructors and the appropriate accessor and mutator functions for the class. (5 points)

Demonstrate the class by writing a program that uses TeamLeader object by entering the following information:

Employee name:

Employee number:

Hire date:

Shift:

Hourly pay rate:

Fixed Monthly Bonus:

Minimum number of hours of training per year:

Driver program should use overloaded stream operator to display all information related to the created object. (5 points)

Expected output:

image text in transcribed

The employee name : Mark The Pay Rate : 30 The employee ID : 124586 The Hire Date : 20210721 Shift : Night Bonus Rate : 100 Training hours : 50 Required hours : 70 The employee name : Mark The Pay Rate : 30 The employee ID : 124586 The Hire Date : 20210721 Shift : Night Bonus Rate : 100 Training hours : 50 Required hours : 70

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

Spatial Databases A Tour

Authors: Shashi Shekhar, Sanjay Chawla

1st Edition

0130174807, 978-0130174802

More Books

Students also viewed these Databases questions

Question

LO4 Provide an overview of four challenges facing HR today.

Answered: 1 week ago