Reference no: EM133516245
Advanced Object Oriented Programming
Assume that a bank maintains the following different types of accounts for its customers:
• Current Account: A cheque book is provided for the customer and the number of cheques the customer has issued is tracked.
• Deposit Account: The number of withdrawals a customer can make is limited and no cheque book service is provided. An account under this type earns interest based on a fixed interest rate.
• Restricted Account: This is a special type of current account. The withdrawal amount in each transaction cannot exceed a pre-defined maximum withdrawal limit.
• Account with Overdraft Facility: This is also a special type of current account. The balance of such an account is allowed to be negative subject to an overdraft limit.
Each type of account has a name, account number and a balance.
(a) Develop an account class hierarchy based on the above information. Identity attributes and their types that need to be defined in each class. You can make your own assumptions to ensure that the classes work fine.
(b) For each class in your class hierarchy developed in part (a), implement the corresponding withdraw(amount) method in Python. The method should return a string that contains either information on the remaining account balance if the withdrawal is successful or an error message otherwise.
(c) Assume that a Bank class maintains an array of bank accounts (which could be of different types). The withdrawFromAccount(accountNumber, amount) method in the Bank class takes the account number and corresponding amount, to find the specified account in the array and performs a withdrawal transaction accordingly if the account is found. It will display an error message if the account is not found. Implement this method in Python and comment on how polymorphism is used in your implementation.
(d) implement deposit methods for all account types.
(e) design and implement a banking system for account management, including withdraw and deport operations.
(f) save all account information into a file or multiple files for next time access.
You submission should include:
1. A report including:
how you model and analysis the problem
UML class diagram
How you test your program
Screenshots show your test results
2. All source code
3. Saved account information file according to you test result.