Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Help me write it in Java, same input and output. The output is 1600. Suppose Willy's Wing World restaurant would like to develop a salary

image text in transcribed

image text in transcribed

Help me write it in Java, same input and output. The output is 1600.

Suppose Willy's 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 employee's salary in total based on the input data. For example, Alice's normal working time is t hours per week. Each week, she receives d dollars for each hour of normal work; but if she works beyond t hours, then she would receive D dollars for each extra hour beyond t 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 t,d,D, and T are all non-negative integers. The input to the program is two lines: (1) the number of employees and (2) t,d,D and T, respectively (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 t - Wages per hour of normal work d - Extra wages per hour of extra work D - Actual working hour T 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 t,d,D and T. 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 normal working hour, extra wage will be paid to the employees. 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 normal 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. Example

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

=+4. What activities make up the listening process? [LO-4]

Answered: 1 week ago