Question: A / Design and implement base class to represent a Worker with the following attributes: ID , name, address, and hired date. Make sure to
A Design and implement base class to represent a Worker with the following attributes: ID name, address, and hired date. Make sure to implement the necessary constructorsgetterssetters and justify which the access modifier of each method ie why it is public, private or protected The Worker class should have a "Pay" abstract method that will return the amount a worker get per week.
B Implement a complete HourlyWorker class from the Worker class. The HourlyWorker should have the hourly pay rate and the hours they work per week.
C Implement a complete SalaryWorker form the Worker who have a fixed annualyearly salary. Note, there are weeks in a year.
D Create a SalaryWorker object and an HourlyWorker object, manipulate their attributes, and then explain what the expected output of the objects if we invoke the "pay" method on each of them.
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
