Answered step by step
Verified Expert Solution
Link Copied!

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 3 and 4 to be user-defined functions - as a note, the functions can be void (self-contained)
Create option 5, 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 1.5 times hourly rate for each hours over 40 hours. You must use a function called calculatePay that takes 2 parameters: rate and hours. The function will return a double that is the calculated pay.
Create option 6, 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

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Introduction To Constraint Databases

Authors: Peter Revesz

1st Edition

1441931554, 978-1441931559

More Books

Students also viewed these Databases questions