Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Write a Java class that a) Implement the classes outlined in the UML diagram above, ensuring the classes are serializable. Note: Employees are paid a

Write a Java class that a) Implement the classes outlined in the UML diagram above, ensuring the classes are serializable. Note: Employees are paid a rate of 15 per hour. The Employee class contains the following abstract method: abstract double earnings(); [15 Marks] b) Write a driver class that creates a LinkedList of employees. Populate the list with two instances of the subclass, then calculate and display the earnings. Finally, serialize the list. image text in transcribed

> Employee name: String pay: double Employee Employee(String) getName(): String setName(String):void toString(): String Java Class>> HourlyEmployee hours Worked: double Hourly Employee Hourly Employee(String) getHours Worked():double setHours Worked(double):void earnings():double a) Implement the classes outlined in the UML diagram above, ensuring the classes are serializable. Note: Employees are paid a rate of 15 per hour. The Employee class contains the following abstract method: abstract double earnings(); [15 Marks) b) Write a driver class that creates a LinkedList of employees. Populate the list with two instances of the subclass, then calculate and display the earnings. Finally, serialize the list

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

Relational Database Design With Microcomputer Applications

Authors: Glenn A. Jackson

1st Edition

0137718411, 978-0137718412

More Books

Students also viewed these Databases questions