
Concept explainers
Employee and ProductionWorker Classes
Write an Employee class that keeps data attributes for the following pieces of information:
■ Employee name
■ Employee number
Next, write a class named ProductionWorker that is a subclass of the Employee class. The ProductionWorker class should keep data attributes for the following information:
■ Shift number (an integer, such as 1, 2, or 3)
■ Hourly pay rate
The workday is divided into two shifts: day and night. The shift attribute 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 the appropriate accessor and mutator methods for each class.
Once you have written the classes, write a

Want to see the full answer?
Check out a sample textbook solution
Chapter 11 Solutions
EBK STARTING OUT WITH PYTHON
Additional Engineering Textbook Solutions
Thinking Like an Engineer: An Active Learning Approach (4th Edition)
Java How to Program, Early Objects (11th Edition) (Deitel: How to Program)
Degarmo's Materials And Processes In Manufacturing
BASIC BIOMECHANICS
Management Information Systems: Managing The Digital Firm (16th Edition)
Java: An Introduction to Problem Solving and Programming (8th Edition)
- EBK JAVA PROGRAMMINGComputer ScienceISBN:9781337671385Author:FARRELLPublisher:CENGAGE LEARNING - CONSIGNMENTMicrosoft Visual C#Computer ScienceISBN:9781337102100Author:Joyce, Farrell.Publisher:Cengage Learning,Programming Logic & Design ComprehensiveComputer ScienceISBN:9781337669405Author:FARRELLPublisher:Cengage
- Systems ArchitectureComputer ScienceISBN:9781305080195Author:Stephen D. BurdPublisher:Cengage LearningC++ Programming: From Problem Analysis to Program...Computer ScienceISBN:9781337102087Author:D. S. MalikPublisher:Cengage LearningC++ for Engineers and ScientistsComputer ScienceISBN:9781133187844Author:Bronson, Gary J.Publisher:Course Technology Ptr




