Question: Hi please help code the question below with as much explanation for your steps as possible so I can understand more deeply. I appreciate your

Hi please help code the question below with as much explanation for your steps as possible so I can understand more deeply. I appreciate your help immensely so thank you!

Hi please help code the question below with as much explanation foryour steps as possible so I can understand more deeply. I appreciate

This is an object oriented programming problem. You will need to create three python files: main.py, bank.py, and account.py. The file account.py contains an object called class Account that stores the ID number of a single bank account (named accountlD) and the balance in the account (named accountBalance). The object has a constructor that assigns the account ID number with the ID and initializes accountBalance with the balance passed to it. Write the method named deposit(n) that increases accountBalance by n only when n is positive, otherwise it does not change the balance and does not return an error message. Write the method withdraw(n) that reduces the amount in accountBalance by n only when n is a positive value and not greater than the accountBalance, otherwise it does not change the balance and does not return an error message. Write the method fee(n) that deducts accountBalance by n, where n is an integer number from 0 to 100 representing the percentage. For example if n is 50 (meaning 50%) then accountBalance looses half of its value. In other words, if accountBalance = 200 and n = 50 then accountBalance = 100. If n is not in the range of O to 100 then the account balance does not change and no error message is displayed. Write a method named getlD() that returns the accountlD. Write a method named getBalance() that returns the accountBalance. The file bank.py contains an object called class Bank that contains a dictionary variable storing Account objects (named accountDict) and another variable that stores the name of the bank (named bankName). The object has a constructor that assigns the name of the bank with the name passed to it and initializes accountDict to empty. Write the method named addAccount(account) that adds an Account object to the accountDict class variable using the account's ID number as the dictionary's key. Write the method named findAccount(lD) that returns an Account using the parameter ID. The file main.py contains the main program. Do the following: 1. Instantiate a bank and give it a name. 2. Create 3 account objects and use the addAccount() method to place them into the bank (you supply the argument values) 3. Use the findAccount() method for each account and call the account methods: deposit $100 and withdraw $200. 4. Use the findAccount() method, a second time to apply a fee of 30% to only one account of your choosing 6. Print all the accounts to the screen Your program does not ask for input from the user. Everything is hard coded

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 Programming Questions!