Answered step by step
Verified Expert Solution
Link Copied!

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
0
4
,
whereas wage employee
s IDs start with
5
7
and part
-
time employee
s IDs start with
8
9
.
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
4
0
in one week.
Part
-
time employees
pay is calculated based on hourly rate
*
work hours with no overtime paid.
Instructions
1
.
Create the classes as shown in the diagram on the following page.
2
.
Place the employees.txt data file in the res folder.
3
.
Create an inheritance tree whereby Salaried, PartTime and Wages inherit from Employee.
4
.
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.
6
3
4
5
6
7
:Fred Flintstone:
3
4
Flintrock Way, Bedrock, BC:
(
3
4
5
)
2
9
5
-
9
0
7
6
:
6
7
8
4
5
3
2
3
4
:June
1
5
,
2
0
0
0
BC:Pediatrics:
2
7
.
8
5
:
4
4
2
1
7
5
4
6
:Samuel Ludlow III:
2
3
4
5
The Rich Man Way, RichVille, RC:
(
5
6
7
)
3
2
4
-
9
8
1
2
:
7
6
8
9
5
6
4
5
3
:February
2
9
,
1
9
4
2
:Collections Section:
2
0
5
0
0
8
6
5
9
5
:Bill Partley:
1
1
Partway Road, Almost, NW:
(
1
1
1
)
2
3
2
-
9
8
7
6
:
8
7
6
3
4
5
9
8
7
:July
1
0
,
1
9
6
6
:Parts Stuff:
2
0
.
5
5
:
1
8
0
9
9
9
9
9
9
:Dr
.
Evil:Some Where in the Caribean:
(
9
9
9
)
9
9
9
-
9
9
9
9
:
9
8
9
8
9
8
9
8
:February
2
9
,
1
9
7
7
:World Chaos Care:
1
0
0
0
0
0
0
9
5
3
6
4
7
6
: Perky Volunteer:
3
4
3
Volly Road, Volunteersalot:
(
2
1
2
)
3
4
5
-
9
8
7
6
:
8
6
7
6
4
3
7
8
2
:October
1
4
,
1
9
4
7
:Volunteer Organization:
1
6
.
8
0
:
2
2
5
4
1
5
3
:BobBob Never:
2
2
NeverReally Lane, Neverland:
(
2
3
4
)
6
7
4
-
7
8
6
5
:
9
8
7
6
5
6
7
8
:September
3
,
1
9
8
8
:Never Media:
3
0
.
6
0
:
4
8
7
7
5
3
4
2
:Winnie Van Winnipeg:
1
0
0
Aker Wood West, Winnipeg:
(
9
9
9
)
5
5
5
-
8
8
8
8
:
2
3
4
7
7
7
4
4
4
:January
4
,
2
0
0
0
:Forestry:
2
8
.
4
5
:
3
8
1
2
3
4
9
8
7
:Sam Packitaway:
3
4
5
Stash Road, Piles, Alot:
(
6
6
0
)
5
4
6
-
9
8
6
7
:
9
9
9
8
8
8
7
7
7
:March
1
9
,
1
9
5
8
:Capital Acquisition:
2
5
6
7
5
5
4
8
9
8
6
7
:Elle Driver:
3
2
Mountain Drive, Los Angeles:
(
7
6
5
)
4
5
6
-
7
7
6
6
:
7
6
5
0
9
8
3
4

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

Students also viewed these Databases questions

Question

Which are non projected Teaching aids in advance learning system?

Answered: 1 week ago