Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Complete #1,2,3 at end of chapter. Please submit just one file for the classes and main to test the classes. Just create the classes before

Complete #1,2,3 at end of chapter. Please submit just one file for the classes and main to test the classes. Just create the classes before main and submit only one cpp file. Do not create separate header files. Use Chap15Prep.cpp as your base. The Employee and Production Worker are in the file. They satisfy #1 Employee and ProductionWorker Classes.

image text in transcribedimage text in transcribed
1. Employee and ProductionWorker Classes Design a class named Employee. The class should keep the following information: . Employee name . Employee number . Hire date Write one or more constructors, and the appropriate accessor and mutator functions, for the class. 15 Inheritance, Polymorphism, and Virtual Functions Next, write a class named ProductionWorker that is derived from the Employee class. 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 acces- sor and mutator functions, for the class. Demonstrate the classes by writing a program that uses a ProductionWorker object.2. ShiftSup-arvi tor Class in a particular factory, a shift supervisor is a salaried employee who supervises a shift. in addition to a salary. the shift supervisor earns a yearly bonus when his or her shift meets production goals. Design a SM 1' t5uperv1 our class that is derived from the [5an oyee class you created in Programing Challenge 1 [Employee and Production 1Worker Classes}. The 5h1ft5upervieot' class should have a member variable that holds the annual salary1 and a member variable that holds the annual production bonus that a shift supervisor has earned. Write one or more cmtstructors and the appropriate acoessor and mutator Funcu'ons For the clam. Demonstrate the class by writing a program that uses a ShiftSup-erv'l eor object. 3. Tee-Leader Class 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+ Dmign a TeenLeeder class that attends the Productior-iorker class you designed in Programming Challenge ] Employee and Production 1|I'lll'orlter Classes}. The Team Leader 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 aooessor and mutator functions for the class. Demonstrate the class by writing a program that uses a Team Leader object

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

Financial management theory and practice

Authors: Eugene F. Brigham and Michael C. Ehrhardt

12th Edition

978-0030243998, 30243998, 324422695, 978-0324422696

Students also viewed these Programming questions