Question: 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

Python: Object Oriented Programming Can I please get code for the following

In OOP lab1 Q3, we created a class named "bankBalance" with the

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

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!