Question
Create a class using Eclipse called YourName2 (If your name is John, name it as John2) Make sure check to add main method to the
Create a class using Eclipse called YourName2 (If your name is John, name it as John2)
Make sure check to add main method to the class
This program determines the gross pay for each employee for a company using a sentinel controlled loop.
The company pays its employee by hourly wage. Each employee normally works no more than 40 hours. Any hour above 40 will be paid by 1.5 hourly wage. If an employee has hourly wage of $9 and he/she worked 40 hours than his/her salary is 40*9=360. If an employee worked 45 hours with hourly wage of $9 then he/she will be paid 40*9+ 5*9*1.5=360+67.5=427.50.
Write a program to input the working hours and hourly wage using a loop. To end the input, enter -1 as hours.
In each iteration, print out each employees weekly salary.
When loop ends, print out total number of employee, total salary and average salary
Step 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