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

匿名用户 最后更新于 2021-11-29 17:10 计算机类Computing

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 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

已邀请: