Question: Refactor options 3 and 4 to be user - defined functions - as a note, the functions can be void ( self - contained )
Refactor options and to be userdefined functions as a note, the functions can be void selfcontained
Create option which will allow the user to calculate weekly pay. The option will prompt the user for the number of hours worked and the hourly pay. Please note that you will need to handle an overtime situation. Overtime is calculated at times hourly rate for each hours over hours. You must use a function called calculatePay that takes parameters: rate and hours. The function will return a double that is the calculated pay.
Create option which will prompt the user for a savings account balance and an annual interest rate. Create a void function displayInterest that will display the balance of the savings account for the next five years. Just so you know, each year, you will need to add the accrued interest to the balance and display it
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
