Assignment 3 In this assignment, you are going to test your knowledge in Java classes inheritance, polymorphism, and int
Posted: Sat Nov 27, 2021 2:33 pm
Assignment 3 In this assignment, you are going to test your knowledge in Java classes inheritance, polymorphism, and interfaces. Here are the requirements: D An organisation pays monthly salaries to three different types of payees as follows: 1. Full time employees: total monthly salary= basic salary + bonus - tax-health insurance 2. Part time employees: total monthly salary=daily hours hourly rate22 3. Students: total monthly salary= 100.0 Full time and part time employees are officially hired by the organisation, and they share some common properties, such as name and number. A student works as an unofficial person for the organisation, for a fixed monthly salary, Student class has some properties such as id, name, and college. Software considerations: • There is a client module (assume it where the main method is) that wants to use a method named printMonthly Salary. This method takes one object (a payee object) as a parameter, then displays the monthly salary for the passed object. However, this method requires that the passed payee object must have a method named getCompensation that simply returns how much does the payee get per month. Employee objects should have the ability to return their string representation as 9. "Employee number:" + number name:* + name Full time employees objects should do the same as well, with the string "(FT) attached to the end of the string Part time employees objects should do the same as well with the string "(PT) attached to the end of the string The client module should have some test code that demonstrates the required functionality Add constructors, setters, getters, and any other relevant code that can help in constructing this program