Develop a C# app that will determine the gross pay for each of three employees. The company pays straight time for the first 40 hours worked by each employee and time-and-a-half for all hours worked in excess of 40 hours. You’re given a list of the three employees of the company, the number of hours each employee worked last week and the hourly rate of each employee. Your app should input this information for each employee, then should determine and display the employee’s gross pay. Use the Console class’s ReadLine method to input the data.

What will be an ideal response?


Top:
Determine the gross pay for an arbitrary number of employees
First refinement:
For each employee
Input the hours worked
Input the hourly rate
Calculate and display worker’s gross pay
Second refinement:
Prompt the user for the hours worked for the first employee
Input the hours worked for the first employee
While the sentinel value (-1) has not been entered for the hours
Prompt the user for the employee’s hourly rate
Input the employee’s hourly rate
If the hours input is less than or equal to 40
Calculate gross pay by multiplying hours worked by hourly rate
Else
Calculate gross pay by multiplying hours worked above forty by 1.5 times the hourly rate and adding 40 hours worked by the hourly rate
Display the employee’s gross pay.
Input the hours worked for the next employee

Computer Science & Information Technology

You might also like to view...

A ________ is a computer found in large businesses, organizations, and government agencies where thousands of users must simultaneously use the data and resources of their institution

A) mainframe B) tablet C) supercomputer D) desktop

Computer Science & Information Technology

By default, text data is center-aligned in a cell

Indicate whether the statement is true or false

Computer Science & Information Technology

You have just installed a video adapter and nothing outputs after the computer powers on. Which of the following is NOT a logical thing to check?

A) Card inserts fully into expansion slot B) Monitor cable attaches correctly to adapter C) Screensaver setting in Display Control Panel D) Video driver for the operating system E) Video card power connection

Computer Science & Information Technology

Which statement is false?

a) A pointer can always be assigned to another pointer of the same type. b) A cast operator must always be used to convert the pointer on the right of an assignment to the pointer type on the left of the assign-ment. c) Variables of all pointer types can be assigned a pointer to void. d) A pointer to void can be assigned a pointer of any type.

Computer Science & Information Technology