Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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():

image text in transcribed
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

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database Internals A Deep Dive Into How Distributed Data Systems Work

Authors: Alex Petrov

1st Edition

1492040347, 978-1492040347

More Books

Students also viewed these Databases questions

Question

=+Have they changed the way employees view IP?

Answered: 1 week ago