Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Python: Object Oriented Programming Can I please get code for the following In OOP lab1 Q3, we created a class named bankBalance with the attribute

Python: Object Oriented Programming

Can I please get code for the following

image text in transcribed

image text in transcribed

In OOP lab1 Q3, we created a class named "bankBalance" with the attribute "balance". Suppose the current interest rate is 2%. To attract more deposits, the bank decides to raise the interest rate. Create a method called "raise_rate()" in this class to set up a new interest rate for both accounts. Create two accounts with deposits of $1000 or $2000, respectively. Apply the method "raise-rate()" to set a new interest rate to 5%. Create another method called "cal_balance()" to calculate the finial balance. You may need the following formula for calculation A P) , in which: A- Final account balance P- Principle, the initial balance r- Annual interest rate n 12 month t-years over which the interest is accumulating Create a method called "display()" to print out the finial balance. After applying rising interest rate, print the new balance again The final balance for BankAccount "Jon Snow" with initial balance of $1000 at the interest rate of 0.02 after 2 years is: $1040 The final balance for BankAccount "Sansa Stark" with initial balance of $2000 at the interest rate of 8.82 after 3 years is: $2123 The final balance for BankAccount "Jon Snow" with initial balance of $1000 at the interest rate of 0.05 after 2 years is: $1104 The final balance for BankAccount "Sansa Stark" with initial balance of $2000 at the interest rate of 0.05 after 3 years is: $2322 Hint: based on the program in labl, you need more attributes to instantiate the class

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

Creating A Database In Filemaker Pro Visual QuickProject Guide

Authors: Steven A. Schwartz

1st Edition

0321321219, 978-0321321213

More Books

Students also viewed these Databases questions

Question

Know how productivity improvements impact quality and value.

Answered: 1 week ago

Question

Recommend the key methods to improve service productivity.

Answered: 1 week ago