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
2. 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 0, if not, allow the user to re-enter.
3. 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 40. If the number of hours exceed 40, any hours worked beyond 40 hours are compensated at 1.5 times the hourly rate. For example, if number of hours is 20, and the rate is $30.00, weekly wage is:
$600.00(that is: 30 x 20)
However, if number of hours is 15, and the rate is $30.00, the weekly wage Is:
S1,132.00(that is: 30 x 40+30\times (5\times 1.5)
4. Write a method that displays the hours worked, hourly rate and weekly wage. Make sure all output values are formatted appropriately, i.e, use the currency format for money, and only two digits after the decimal point for non-integers.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!