Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Simple java code Exercise 2: A company runs a small factory. You need to create a pay slip for the employees of the company. The

Simple java code image text in transcribed

Exercise 2: A company runs a small factory. You need to create a pay slip for the employees of the company. The details of the Java application to be implemented is provided below. A. The factory workers are paid one of the three hourly rates depending on their skill level. Write a method to that takes the skill level as a parameter and returns the hourly rate Use the switch construct in Jova Skill Level Hourly Rate (dirham) A 100 8 70 C 35 B. Each factory worker might work any number of hours per week; any hour over 40 are paid at double rate. Write a method that takes the hours worked and calculates the gross pay depending on if there is overtime or not. Return the gross pay from the method. C. Factory workers have extra benefits. Only workers in skill level A can choose to participate in the Retirement Plan at 5% of their gross pay. Also, The workers in all skill levels can choose to participate in the following insurance options: Option Explanation Weekly Cost to Employee (dirham 1 Medical Insurance 150 2 Dental Insurance 95 3 Disability insurance 65 Write a method that takes the worker's skill level and gross poy es parameter and asks the user the necessary questions to decide on benefits (Insurance and/or Retirement). The user must be given the choice to choose all three types of Insurances. The method must return the net pay after deducting the benefits if the worker chooses to obtain these benefits D. Ask the user to enter the details of all employees. The details include: Employee ID, Name, Sim level, and Working Hours per week should entered in the main method. The Retirement and Insurance benefits should be asked from the User in the above method. E Generate a pay slip for each employee le. If the user enters 10 employees, then 10 payslips are to be generated. Each payslip is written to a separate file with the name given as the employee id. For example: if the employee id is A11P9, then the file "A11P9 but will contain the pay slip of the employee. The pay slip for each worker must contain the following details in a neat and readable format The Name, and skill level of the Factory Worker . The total number of working hours of the factory worker The hourly rate The gross pay of a factory worker i before the deductions The net payle Gross pay Total deductions

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

Advanced MySQL 8 Discover The Full Potential Of MySQL And Ensure High Performance Of Your Database

Authors: Eric Vanier ,Birju Shah ,Tejaswi Malepati

1st Edition

1788834445, 978-1788834445

More Books

Students also viewed these Databases questions

Question

=+ For what reasons can and do unions go on strike?

Answered: 1 week ago