Question: in java, first image is question, the other two are names coded in JAVA please Problem Description: Design and implement a Worker class, the class

in java, first image is question, the other two are names  in java, first image is question, the other two are names
coded in JAVA please Problem Description: Design and implement a Worker class,
the class diagram is below. Worker > >> #String lastName, firstName, SSN
coded in JAVA please + 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

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. Methods for class Weekly Worker DataBase: WeeklyWorkerDataBase() Constructs a weeklyWorkerDatabase object. The data is from system standard input. Manager getManagers() Returns an array of all managers in the database. The length of the array is equal to the number of managers in the database. Salaried Worker | getSalaried Workers Returns an array of all salaried workers in the database. The length of the array is equal to the number of salaried workers in the database. Sales Worker() getSales Workers Returns an array of all sales workers in the database. The length of the array is equal to the number of sales workers in the database. double get'Total Weekly Salaryo Returns the total amount of weekly salary of all the workers in the database. Worker getWorkerBySSN(String ssn) Returns the worker having the specified social security number Workerll get Workers MakingMoreThan(double amount) Returns an array of workers making more than the specified amount per week. The length of the array is equal to the number of workers making more than the specified amount per week. Worker get HighestSalary Worker() Returns the worker having the highest weekly salary in the database file. Use the compare To method Input Format: Manager:lastName:firstName:SSN:weekly Salary Sales Worker:lastName:firstName:SSN:weekly Base Salary:commissionPercentage salesAmountFor Week Salaried Worker: lastName:firstName:SSN:hourly Rate:hoursWorkedForWeek Sample Inputs: Manager:Bonds:Barry:123456789:118599.10 Manager:Pujols:Albert:987654321:65330.50 Sales Worker:Sexon:Richie:111222333:50000.00:1.3:34500.30 Salaried Worker:Jenkins:Geoff:444555666:110,00:25 Sales Worker:Sheets:Ben:777888999:30000.25.75:56000,50 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. Methods for class Weekly Worker Data Base: WeeklyWorkerDataBase() Constructs a weeklyWorker Database object. The data is from system standard input. Manager | getManagers() Returns an array of all managers in the database. The length of the array is equal to the number of managers in the database. Salaried Worker | getSalaried Workers() Returns an array of all salaried workers in the database. The length of the array is equal to the number of salaried workers in the database. SalesWorker() getSales Workers() Returns an array of all sales workers in the database. The length of the array is equal to the number of sales workers in the database. double getTotalWeeklySalaryo Returns the total amount of weekly salary of all the workers in the database. Worker getWorkerBySSN(String ssn) Returns the worker having the specified social security number. Workerl getWorkersMakingMore Than(double amount) Returns an array of workers making more than the specified amount per week. The length of the array is equal to the number of workers making more than the specified amount per week. Worker getHighestSalary Worker() Returns the worker having the highest weekly salary in the database file. Use the compareTo method. Input Format: Manager:lastName:firstName:SSN:weekly Salary Sales Worker:lastName:firstName:SSN:weekly Base Salary:commissionPercentage salesAmountFor Week Salaried Worker: lastName:firstName:SSN:hourlyRate:hours WorkedForWeek Sample Inputs: Manager:Bonds:Barry:123456789:118599.10 Manager:Pujols:Albert:987654321:65330.50 Sales Worker:Sexon:Richie: 111222333:50000.00:1.3:34500.30 Salaried Worker:Jenkins:Geoff:444555666:110.00:25 Sales Worker:Sheets:Ben:777888999:30000.25: 75:56000.50

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!