Question: Write a method to display appropriate instructions to the user: Introducing what this project does and display your name and student ID 2 . Write
Write a method to display appropriate instructions to the user: Introducing what this project does and display your name and student ID
Write a method asking the user to enter
the number of hours worked in a week,
the hourly rate of pay in dollars and cents as a single value.
These values must be greater than if not, allow the user to reenter.
Write a method that takes the total number of hours worked in a week and the hourly rate as two arguments from within the Main method, and then calculates the weekly wage The weekly wage is calculated by multiplying the total hours by the hourly rate if number of hours is less than or equal to If the number of hours exceed any hours worked beyond hours are compensated at times the hourly rate. For example, if number of hours is and the rate is $ weekly wage is:
$that is: x
However, if number of hours is and the rate is $ the weekly wage Is:
Sthat is: x times times
Write a method that displays the hours worked, hourly rate and weekly wage. Make sure all output values are formatted appropriately, ie use the currency format for money, and only two digits after the decimal point for nonintegers.
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
