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. 634567:Fred Flintstone:34 Flintrock Way, Bedrock, BC:(345)295-9076:678453234:June 15,2000 BC:Pediatrics:27.85:44
217546:Samuel Ludlow III:2345 The Rich Man Way, RichVille, RC:(567)324-9812:768956453:February 29,1942:Collections Section:20500
86595:Bill Partley:11 Partway Road, Almost, NW:(111)232-9876:876345987:July 10,1966:Parts Stuff:20.55:18
0999999:Dr. Evil:Some Where in the Caribean:(999)999-9999:98989898:February 29,1977:World Chaos Care:1000000
9536476: Perky Volunteer:343 Volly Road, Volunteersalot:(212)345-9876:867643782:October 14,1947:Volunteer Organization:16.80:22
54153:BobBob Never:22 NeverReally Lane, Neverland: (234)674-7865:98765678:September 3,1988:Never Media:30.60:48
775342:Winnie Van Winnipeg:100 Aker Wood West, Winnipeg:(999)555-8888:234777444:January 4,2000:Forestry:28.45:38
1234987:Sam Packitaway:345 Stash Road, Piles, Alot:(660)546-9867:999888777:March 19,1958:Capital Acquisition:25675
5489867:Elle Driver: 32 Mountain Drive, Los Angeles:(765)456-7766:765098345:October 5,2000:International Sales:40.25:52

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

More Books

Students also viewed these Databases questions