Answered step by step
Verified Expert Solution
Question
1 Approved Answer
A company has three employee categories: salaried, wage and part - time. All employees have an employee ID number, name and SIN. Salaried employees have
A company has three employee categories: salaried, wage and part
time. All employees have an employee ID number, name and SIN. Salaried employees have ID numbers starting with
whereas wage employee
s IDs start with
and part
time employee
s IDs start with
All employees are paid weekly and payment for each employee category is calculated as follows:
Salaried employees are paid a set salary each week.
Wage employees
pay is calculated using hourly rate
work hours with overtime paid at time and a half for any hours worked over
in one week.
Part
time employees
pay is calculated based on hourly rate
work hours with no overtime paid.
Instructions
Create the classes as shown in the diagram on the following page.
Place the employees.txt data file in the res folder.
Create an inheritance tree whereby Salaried, PartTime and Wages inherit from Employee.
Create an application with the following methods:
a
Fill a list with objects based on the supplied data file.
b
Calculate and return the average weekly pay for all employees.
c
Calculate and return the highest weekly pay for the wage employees, including the name of the employee.
d
Calculate and return the lowest salary for the salaried employees, including the name of the employee.
e
What percentage of the company
s employees fall into each employee category?
The UML Diagram for the case study is shown below. Getters
and Setters
implies the set of methods that act as Getters and Setters for the private variables. :Fred Flintstone: Flintrock Way, Bedrock, BC:::June BC:Pediatrics::
:Samuel Ludlow III: The Rich Man Way, RichVille, RC:::February :Collections Section:
:Bill Partley: Partway Road, Almost, NW:::July :Parts Stuff::
:Dr Evil:Some Where in the Caribean:::February :World Chaos Care:
: Perky Volunteer: Volly Road, Volunteersalot:::October :Volunteer Organization::
:BobBob Never: NeverReally Lane, Neverland: ::September :Never Media::
:Winnie Van Winnipeg: Aker Wood West, Winnipeg:::January :Forestry::
:Sam Packitaway: Stash Road, Piles, Alot:::March :Capital Acquisition:
:Elle Driver: Mountain Drive, Los Angeles:::October :International Sales::
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started