Question: it needs to be in Java 1. An Employee class maintains the information for a number of employees. The data describing each employee consists of
1. An Employee class maintains the information for a number of employees. The data describing each employee consists of name, age, and weekly_income. The constructor method should accept the name and age as parameters. Methods should be provided to get and set both name and age. There are two types of employees: Part_time and Full_time. Part_time Employee's weekly_income = num_hrs x rate_hr. Make num_hrs and rate_hr as members of the class Part_time. Implement both get_wk_income and set_wk_income methods. Full_time Employee's weekly income = num_yrs_services x factor where factor is 1000. Make num_ yrs services and factor as members of the class Full_time and declare factor as a constant integer. Implement both get wk_income and set wk income methods. Set up classes Employee, Part_time and Full_time with maximum use of inheritance. Implement class EmployeeDemo to test your program (get: read set: write). (14\%)
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
