Answered step by step
Verified Expert Solution
Question
1 Approved Answer
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
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started