Savings Account Class

Create class SavingsAccount.

Each object of the class contains 3 instance variables: name - the name of the account holder, savings_balance - indicating the amount the saver currently has on deposit, interest_rate - the annual interest rate to be applied to this account.

The class should have the following methods:
The contructor__init__should take in three parameters as specified in the following

method header statement:
def_init_(self, name=", savings_balance = 0, interest_rate=0);

Thecalculate_monthly_interest method calculates the monthly interest by multiplying the savings_balance by interest_rate divided by 12 - this interest should be added to savings_balance.

The header for the method should be defcalculate_monthly_interest(self):

The get_name method which returns the name of the account holder and has the following method header:
def get (name(self) :

The get_balance method which returns the current savings_balance and has the following header:
def get_balance(self):

The main method to test class SavingsAccount.
Instantiate two SavingsAccount objects, saver1 and saver2.

saver1 will be created with a name of Fred Smith, a balance of $2000.00 and an interest rate of .04.
saver2 will be created with a name of Sue Jones, a balance of $3000.00 and an interest rate of .04.

Calculate the monthly interest for 12 months and print the new balances for both savers.
The output should be displayed as a columnar table and all dollar amounts should be displayed to two decimal places.

The display of the column headings should use the get_name function to get the savers names.
The display of the account balances should use the get_balance function.

The main method has the following header:
def main():

Solution PreviewSolution Preview

This material may consist of step-by-step explanations on how to solve a problem or examples of proper writing, including the use of citations, references, bibliographies, and formatting. This material is made available for the sole purpose of studying and learning - misuse is strictly forbidden.

class SavingsAccount:

    def __init__(self, name='',savings_balance=0,interest_rate=0): = name
$13.00 for this solution

PayPal, G Pay, ApplePay, Amazon Pay, and all major credit cards accepted.

Find A Tutor

View available Computer Science - Other Tutors

Get College Homework Help.

Are you sure you don't want to upload any files?

Fast tutor response requires as much info as possible.

Upload a file
Continue without uploading

We couldn't find that subject.
Please select the best match from the list below.

We'll send you an email right away. If it's not in your inbox, check your spam folder.

  • 1
  • 2
  • 3
Live Chats