Question
write a java program to calculate the weekly pay for temporary staff in a company. the program will ask the user to enter the number
write a java program to calculate the weekly pay for temporary staff in a company.
the program will ask the user to enter the number of hours worked in a week and the wage per hour.
The weekly pay is calculated by multiplying the two numbers. The program will also calculate the bonus as follow:
- if the staff works 20 hours or below in a week, the bonus is $0;
- if the staff works between 21 and 30 hours, the bonus is $50;
- if the staff works between 31 and 40 hours, the bonus is $100;
- if the staff works more than 40 hours, the bonus is $200.
Finally, the program will print the pay, the bonus, and the total pay (pay + bonus)
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