Question
Suppose Willys Wing World restaurant would like to develop a salary calculation application. You are going to help them design the basic logic. The main
Suppose Willys Wing World restaurant would like to develop a salary calculation application. You are going to help them design the basic logic. The main function is to calculate an employees salary in total based on the input data. For example, Alices normal working time is hours per week. Each week, she receives dollars for each hour of normal work; but if she works beyond hours, then she would re- ceive dollars for each extra hour beyond hours. The same thing happened to every employee, and the output will be the salary for all employees. Write the body of the program called Problem1.java whose main function computes how much the company needs to pay for all the employees in a week. Assume , , , and are all non-negative inte- gers. The input to the program is two lines: (1) the number of employees and (2) , , and , respec- tively (the second line is separated by a space). Detailed information is given as follows. Input The input has two parts The number of employees, and it is an integer number Working hour and payment data of each employee The working hour and payment data contain the following information Normal working hour Wages per hour of normal work Extra wages per hour of extra work Actual working hour The console will print Please input the number of employees:. After inputting the integer number, the console will print Please input the data of employees:. Then the data of employees should be given in the order of , , and . See example below. Processing Your program should be able to calculate the total salary the company needs to pay in a week. Employees have their own normal working hour, and regular wage. However, if their working hours exceed the nor- mal working hour, extra wage will be paid to the employees. Output The output will be printed in the console, which is the total salary of all employees in a week.
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