Question: write the java code for the classes indicated in the UML diagram below 1 + VIE Employee -name: String +Employee(name: String) +getName 1 String +toString():

 write the java code for the classes indicated in the UML
write the java code for the classes indicated in the UML diagram below

1 + VIE Employee -name: String +Employee(name: String) +getName 1 String +toString(): String HourlyEmployee Salaried Employee - monthly Salary: double -hourlyWage: double -hours: int +HourlyEmployee name: Sring, hourlyWage: double, hours: Ink) get Hourly Wagot double + get Hours(): in +toString: String +getEarnings: double +SalariedEmployee(name: String, monthly Salary: double) +ge Monthly Salary: double +toString(): String +getEarning(): double The earnings of an hourly employee is the hourly wage hours worked while the earnings of a salaried employee is the monthly salary. Use best practices to write the implementations of the methods (including the constructors) Then write a driver class that will create an HourlyEmployee called John and a SalariedEmployee called Lisa Their hourly wage (if any), hours worked (if any), and monthly salary (if any) amount is up to you. Call the toString() of each of the employees you created

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!