Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Savings Account This assignment simulates a bank saving account. The program will allow for deposits, withdrawals and calculate interest on the balance of the account.

Savings Account
This assignment simulates a bank saving account. The program will allow for
deposits, withdrawals and calculate interest on the balance of the account. The
program will make use of loops.
Savings Account Class requirements
Store the balance of the account
Store the annual interest rate for the account
Add additional instance data members if needed
Constructor should accept the starting balance for the account.
Provide a method to set the annual interest rate
Provide a method to do deposits
Provide a method to do withdrawals
Provide a method to calculate the monthly interest amount
Monthly interest rate is the annual rate divided by 12
Multiply the monthly rate by the balance and add the result to the
balance
Main Class requirements
Creates instance of the above class.
Prompt the user for the number of months to do the calculations for
Prompt the user for the starting balance of the account
Prompt the user for the annual interest rate
Loop for the number of months
Prompt the user for the amount of deposited for that month use
class method to add the amount to the balance
Prompt the user for the amount of withdrawn for the month from
the account use the class method to subtract the amount from the
balance.
Use class method to calculate the monthly interest amount.
After the loop the program should be display the ending balance, the total
amount of deposits, the total amount of withdrawal and the total interest
earned.
The above loop should be nested in another loop. This loop will ask the user
if they wish to do the calculations again with new data. This loop must use a
string to compare to the user input of either yes or no. If user enters yes
then the above loop (inner loop) should start again. If no then the program
should end.
image text in transcribed

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

More Books

Students also viewed these Databases questions