Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

please help me on solving this using python programming i need option 1&2&3 Assume you are required to develop a banking system that tracks customers'

please help me on solving this using python programming
i need option 1&2&3
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

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

Transactions On Large Scale Data And Knowledge Centered Systems Xxxviii Special Issue On Database And Expert Systems Applications Lncs 11250

Authors: Abdelkader Hameurlain ,Roland Wagner ,Sven Hartmann ,Hui Ma

1st Edition

3662583836, 978-3662583838

More Books

Students also viewed these Databases questions

Question

7. Identify four antecedents that influence intercultural contact.

Answered: 1 week ago

Question

5. Describe the relationship between history and identity.

Answered: 1 week ago