Question
A professional programmer at MID-WAY company Ltd, you have been requested by the IT manager to program a pay maker for the company that will
A professional programmer at MID-WAY company Ltd, you have been requested by the IT manager to program a pay maker for the company that will calculate all its employees pay based on the hours worked by each employee using certain criteria of the company. Scenario All employees employed by MID-WAY Welders Company Ltd are categorized into three different categories. i.e Management level workers, Supervisory level workers and Floor level workers. Each level of workers has different pay rates and normal Hours, determined by the category they belong to.
The table below summarizes the pay rates and normal working hours of each level of workers.
Employee category Hourly Pay rate Normal Working Hours
Management level $7.25 20
Supervisory level $5.25 30
Floor Workers $3.25 40
Each employee pay is subject to some sort of deduction from their pay based on the company policy and individual contribution.
These are as follows:
1. FNPF contribution: 8% of gross pay 2.
Individual Insurance: $3.00
The employees are paid double time (Double the hourly rate) for any hours worked outside (more) than the normal working hours. For employees who only work normal working hours (or less), they are paid normal time on the hourly rates.
Requirements:
1. Create a UML Class Diagram to express the data and behaviors of the above mentioned class.
2. The above program has to be programmed using methods in JAVA. The pay maker should use the following methods to complete the requirements of the program
: i. Public static double getHoursWorked()
ii. Public static char getEmployeeCategory()
iii. Public static double calculateGrossPay(char category, double hrsWorked)
iv. Public static double calculateNetPay(double grossPay) v. Public static void display(double hrs, char category, double grossPay, double NetPay)
3. Use appropriate variables where necessary.
4. Test the program using different employee category, normal hours as well as overtime hours and provide the screen print of the output.
Step by Step Solution
3.35 Rating (161 Votes )
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