Answered step by step
Verified Expert Solution
Link Copied!

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!?image text in transcribed

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 for is dollars OT The number of hours your entered does not comply with company policy or The base salary you entered does not comply with state law

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

Question

The definition and historical roots of eudaimonia.

Answered: 1 week ago