Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Your assignment is to write some classes that wil manage a collection of employees for a company There are two types of employees. There are

image text in transcribed

Your assignment is to write some classes that wil manage a collection of employees for a company There are two types of employees. There are full time employees that have a first name, last name, employee ID number and an annual salary There are part time employees that have a first name, last name, employee ID number, hours worked (in a single week) and an hourly wage. There should be a class that is responsible for the following: . Maintaining a collection of employees. Adding an employee to the collection Printing a list of all employees alphabetically by last name. It shauld print one employee per line and include last name, first name, employee ID number and either salary or hourly wage (Hint: Collections.sort() is available) Printing a single employee (specified by ID number) and the employee's weekly salary Be sure to do the following: Use inheritance and polymorphism to eliminate code duplication and to make the program extendable (i.e. there should only be a single collection of employees) Override the toString() method for any classes invalving employees rather than providing methods that simply display data

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

PostgreSQL Up And Running A Practical Guide To The Advanced Open Source Database

Authors: Regina Obe, Leo Hsu

3rd Edition

1491963417, 978-1491963418

More Books

Students also viewed these Databases questions