Answered step by step
Verified Expert Solution
Question
1 Approved Answer
PLEASE USE JAVA!? Problem 2. The We-Say-So Corporation needs a program to calculate how much to pay their hourly employees. US labor laws state that
PLEASE USE JAVA!?
Problem 2. The We-Say-So Corporation needs a program to calculate how much to pay their hourly employees. US labor laws state that hourly employees should be paid time and a half for any hours over 40 that they work in a single week. So for example, if an employee works for 46 hours in a week, then they get 6 hours of overtime, at 1.5 times their base pay. The We-Say-So Corp. is based in a state where the minimum wage is 5.25 dollars per hour. It is company policy that employees should not work for more than 60 hours in a single week In a class called H2P2: a) Write a method called salaryTotal that takes two inputs: the base pay and hours worked in a week as parameters, and either returns the total pay, -1 if base than minimum wage, or -2 if number of hours worked is more than 60. pays is less b) Also, write a main method that asks the user (a manager, presumably) to input the full name, the base pay and the hours worked in a week for a particular employee using the keyboard (separated by commas and in this order). main should use salaryTotal to compute the total pay for that employee and then print one of the following messages to the screen The total pay forStep 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