This assignment is a group assignment. You need to work in pairs. Please let your teacher know if you do not have a partner to work with.

This assignment is a group assignment. You need to work in pairs. Please let your teacher know if you do not have a partner to work with.

Download the file Bank-Accounts.txt file from Moodle. This file contains the records of bank accounts. 

Your job is to create a Python program that handles the account records. The project reads the data from the file into 5 lists (arrays) at the beginning of the execution, and then allows the user to enter more account records, to update or delete any account record, and to list all account records sorted by their names. At the end of execution, the program saves the updated data into a new file New-Accounts.txt. 

To enter a new record, the program accepts the details from the user and stores them into lists (arrays) (NOT directly to the file). Any missing or invalid input data should cause an appropriate error message. 
To modify a record, the user needs to enter the AccountNo and the program looks into the list (array) for a match to the input AccountNo. If the AccountNo is found in the AccountNo list (array), other details of the account should be displayed, and the program allows the user to update or delete the record. When the Update option is selected, the program saves the updated details of the record to the lists (arrays), after checking for possible input errors. When the Delete option is selected, the program will prompt the user to confirm the deletion. If the user confirms, the record should be deleted from the list (array) (NOT from the file). If the AccountNo is not found, an error message should be displayed. 

To list all account records, the program should sort the records by account names in alphabetic order and then display them, with an additional column showing the amounts of New Balance (=Balance + Interest). The report listing ends with three summary lines: a count of total number of accounts, a sum of all the new balances and an average of all the new balances.

When the user selects to Exit, the program prompts the user to save the records to a file. If user confirms with the letter “Y” for “Yes”, the program writes all contents from all the lists (arrays) to a file New-Accounts.txt in the same format as that in Bank-Accounts.txt. If the user answers “No”, it exits without saving the changes to the account records.  Bank-Accounts.txt is then deleted and New-Accounts.txt is renamed to Bank-Accounts.txt.

A sample of the interface is shown here. However, you may design your own interface as you wish.

Bank Account Management Main Menu:    

Please select an option from the following menu:
•    (E)nter New Accounts
•    (M)odify Account Records
•    (S)how Sorted Account List
•    E(x)it
Enter New Account Data:    

•    Account No.: 12345
•    Name: Smith, J
•    Account Type: Cheque
•    Interest Rate: 3.5

Price: £ 120

100% Plagiarism Free & Custom Written, Tailored to your instructions

Leave your Comments

Can't read the image? click here to refresh