[Solved] Module 06 Post-Assessment Part 2 SavingsAccount Class

$25

File Name: Module_06_Post-Assessment_Part_2_SavingsAccount_Class.zip
File Size: 499.26 KB

SKU: [Solved] Module 06 Post-Assessment Part 2 SavingsAccount Class Category: Tag:
5/5 - (1 vote)

5/5 – (1 vote)

Design a SavingsAccount class that stores a savings accounts annual interest rate and balance. The class constructor should accept the amount of the savings accounts starting balance. The class should also have methods for subtracting the amount of a withdrawal, adding the amount of a deposit, and adding the amount of monthly interest to the balance. The monthly interest rate is the annual interest rate divided by twelve.

To add the monthly interest to the balance, multiply the monthly interest rate by the balance, and add the result to the balance.

Test the class in a program that calculates the balance of a savings account at the end of a period of time. It should ask the user for the annual interest rate, the starting balance, and the number of months that have passed since the account was established. A loop should then iterate once for every month, performing the following:

a. Ask the user for the amount deposited into the account during the month. Usethe class method to add this amount to the account balance.

b. Ask the user for the amount withdrawn from the account during the month. Usethe class method to subtract this amount from the account balance.

Reviews

There are no reviews yet.

Only logged in customers who have purchased this product may leave a review.

Shopping Cart
[Solved] Module 06 Post-Assessment Part 2 SavingsAccount Class
$25