Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

i need any help with this problem in python not in c++ can any one help me thanks in advance Assume you are required to

i need any help with this problem in python not in c++
can any one help me
thanks in advance image text in transcribed
image text in transcribed
image text in transcribed
image text in transcribed
image text in transcribed
Assume you are required to develop a banking system that tracks customers' records. You should be aware of the following features in banking systems: 1. When a new account is opened, its initial balance is zero. 2. The withdraw operation will decrease the balance. Only withdraw is accomplished if the balance is enough (the balance is equal or greater than the amount to be withdrawn). 3- The deposit operation will increase the balance. 4- Close an account means inactivate it, no deposit or withdraw operation can be done with closed accounts. 5. To close an account, its balance should be zero. The required system will keep track of the account's data and the transactions. 1- Account data: Every account has an account number, name, status, and balance. This data will be saved in a file called "customers. bct", where this data is separated by comma. To save space, the account status will be represented as one letter: ' a ' for active, and 'c' for closed. 2- Transaction data : Transaction data (withdraw and deposit) will be save in a file called "transactions.txt". Every transaction is added to the file as a single line that contains: account number, transaction type ['d' for deposit, and ' W ' for withdraw), and the amount as follows: Your program should interact with the user through the following: 1-Main Menu When your program starts, it should display the following menu Please select one of the following: 1- Open an account 2- Close an account 3- Withdraw 4- Deposit 5- Inquiry 6- Transactions 7- Top five accounts 8- Exit Your choice: [ This menu will be repeated until use enters 8 . 2- Option 1: When the user selects 1 , the system asks for account's data as follows: Your choice:1 Enter account number888 Enter customer name:Mansor Abdu1lah The input data will be added to the dictionary, where the default status is ' a ' and the initial balance is zero. In this option, when the user enters account number, the system should ensure there is no account already in the system with that ID. Option 2: When the user select 2 , the system asks for account number, If the account number is not already in the system, it displays "There is no account with this number". Your choice:2 Enter account number 444 There is no account with this number Please select one of the following: If the account number is valid but it has balance, then it cannot be closed. If the account number is valid but the account is already closed Your choice:2 Enter account number 456 Name: Noof Khaled The account is already closed Please select one of the following: If the account is there and its status is active ('a') and has no balance, then it is closed by updating its status from ' a ' to ' c ' in the dictionary. Option 3: When the user enters 3 , the system asks for account number. It should check if the account is in the system or not. Your choice:3 Enter account number999 There is no account with this number Please select one of the following: If the account in the system, it will display the customer name. However, it should check if the account is closed or not. Your choice:3 Enter account number 456 Name: Noof Khaled The account is closed If the account is not closed, it will ask for the amount to be withdrawn, however it should ensure there is enough balance. Your choice:3 Enter account number123 Name: Ahmed Rashed Enter the anount to withdraw:26@0 Insuffcient fund If everything is OK, it decreases the balance by the input amount (in the dictionary). Your choice:3 Enter account number123 Name: Ahmed Rashed Enter the amount to withdraw:7ee Your new balance: 300.8 Transaction completed Please select one of the following: The data of this transaction will be append to file "transactions.txt". This data will include the account number, transaction type (here it is ' w '), and the amount "123,w,700 Option 4: When the user enters 4 , the system asks for account number. It should check if the account is in the system or not. If the account in the system, it will display the customer name. However, it should check if the account is closed or not. If the account is not closed, it will ask for the amount to be deposited. Your choice:4 Enter account number123 Name: Ahmed Rashed Enter the amount to deposit:500 Your new balance: 800. Transaction completed Please select one of the following: The data of this transaction will be append to file "transactions.txt". This data will include the account number, transaction type (here it is ' d '), and the amount "123,d,500" Option 5: When the user select 5 , the system will ask for the account number. It ensures that the account in the system. Your chorcess Enter account number888 There is no account with this number Please select one of the following: If it is in the system, it displays the following information about the account: Your choice:5 Enter account number 123 Name: Ahmed Rashed Status: Active Balance: 1000.0 Please select one of the following: Your choice:5 Enter account number 456 Name: Noof Khaled Status: Closed Balance: 0. Please select one of the following: Option 6: When the user select 6 , the system will ask for the account number. It ensures that the account in the system. Your choice: 6 Enter account number 732 There is no account with this number Please select one of the following: If it is in the system, it displays the last five transaction related to that account. Enter account number123 Name: Ahmed Rashed The last 5 transactions: d 500.0 w 780.0 w 100.0 d 250.0 w 100.0 Please select one of the following: Option 7: The system will display data of the top five accounts in terms of balance. If the number of accounts less than 5 , it displays all of them. Your choice: 7 456 Noof Khaled 0.0 123 Ahmed Rashed 1000.0 777 Ali Mahmodd 4500.0 Please select one of the following: Option 8: The system will save the data in the dictionary to the file "customers.txt" and terminate the main function

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

New Trends In Databases And Information Systems Adbis 2019 Short Papers Workshops Bbigap Qauca Sembdm Simpda M2p Madeisd And Doctoral Consortium Bled Slovenia September 8 11 2019 Proceedings

Authors: Tatjana Welzer ,Johann Eder ,Vili Podgorelec ,Robert Wrembel ,Mirjana Ivanovic ,Johann Gamper ,Mikolaj Morzy ,Theodoros Tzouramanis ,Jerome Darmont

1st Edition

3030302776, 978-3030302771

More Books

Students also viewed these Databases questions