Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

need help must include screenshot ined Lab 4 Two Inheritance Exercises In prior assignments, we design a class to represent a physical or logical object

need help must include screenshot
image text in transcribed
image text in transcribed
ined Lab 4 Two Inheritance Exercises In prior assignments, we design a class to represent a physical or logical object The following two labs, we are going to design a base class then extend to the data and behavior into a derived class. The three classes in this lab are related in base-child relationship, also called inheritance relationship: Employee ---inherit--> ProductionWorker ---inherit---> Team Leader No prescribed test cases is given for Lab4. Like the previous assignments, the test driver shall verify all public methods for all classes that you created for this lab, Attach the test output as your validation for this submission -octor bom Lab 4A Employee and Production Worker Class 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. Next, write a class named ProductionWorker that is derived from the Employee class. The Production Worker class should have member variables to hold the following information: Shift fan integer) Hourly pay rate la double) The attribute values: 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. Demonstrate the classes by writing a program that uses a ProductionWorker object. Submit Source code and test validation Lab 4B Team 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 eam a fixed monthly bonus. Team leaders are required to attend a minimum number of hours of training per year. Design a Teamleader class that extends the Production Worker class you designed in previous Lab 4A. 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 accessor and mutator functions for the class. Demonstrate the class by writing a program that uses a Teamleader object. Submit Source code and test validation

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

Murach's SQL Server 2012 For Developers

Authors: Bryan Syverson, Joel Murach, Mike Murach

1st Edition

1890774693, 9781890774691

More Books

Students also viewed these Databases questions

Question

How many Tables Will Base HCMSs typically have? Why?

Answered: 1 week ago

Question

What is the process of normalization?

Answered: 1 week ago