Question: in java zyDE 3 . 2 0 . 1 : Calculate salary: Calculate overtime using branches. The following program calculates weekly salary and assumes work
in java
zyDE : Calculate salary: Calculate overtime using branches.
The following program calculates weekly salary and assumes workhoursperweek limit of
Overtime refers to hours worked per week in excess of some weekly limit such as hours. Some companies pay timeandahalf for overtime hours, meaning overtime hours are paid at times the hourly wage.
Overtime pay can be calculated with pseudocode as follows assuming a weekly limit of hours:
weeklyLimit
if weeklyHours weeklyLimit
weeklySalary hourlyWage weeklyHours
else
overtimeHours weeklyHours weeklyLimit
weeklySalary hourlyWage weeklyLimit overtimeHours hourlyWage
Run the program and observe the salary earned.
Modify the program to read user input for weeklyHours. Run the program again.
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
