Question: java Problem Description: Design and implement a Worker class, the class diagram is below. Worker > >> #String lastName, firstName, SSN + double getWeekly Salaryo
Problem Description: Design and implement a Worker class, the class diagram is below. Worker > >> #String lastName, firstName, SSN + double getWeekly Salaryo + boolean equals(Worker w) + String toStringo + int compareTo(Worker w) Note: the Worker is an abstract class that implements the Comparable interface where workers are compared by their weekly salary. getWeekly Salaryo method is an abstract method. In addition to Worker class, there are three different kinds of workers in a company, each of which will be a direct sub-class of Worker. These three classes are listed below: 1. Manager gets paid a fixed amount of salary regardless of how many hours they worked in a week. 2. Salaried Worker gets paid by the hour according to his/her hourly pay rate 3. Sales Worker gets paid a fixed based weekly salary plus a percentage of its sales. Details: You are to write six classes: an implementation of the Worker and implementations for each subclasses; a class named Weekly WorkerDataBase as outline below; a client class Driver that will use/test the functionalities of Weekly WorkerDatabase
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
