Project Description C++ Group Project
Hello, dear friend, you can consult us at any time if you have any questions, add WeChat: daixieit
Project Description
accountNo accountName password Balance VIP
0123 Ryan 123456 100000.23 V
0124 Eric 654321 100000.12 N
C++ Group Project
DDL: Jan 2 23º59 p.m, 2024 At most 3 members for each team
In a bank, there are many accounts. An account can be a normal account or a VIP account. Account information is stored in a file in the following format (account.txt):
Every account number (accountNo) contains four digits. Password would be a 6-digits number. For every
account, the client can display, withdraw, deposit and transfer money. These transactions have the following features:
1. Withdraw
For normal account, the customer can withdraw at most 2000 per time. For VIP account, the
customer can withdraw 3000 per time. If a customer wants to withdraw money that exceeds this limit, a warning should be given. When a customer withdraws money from an account and the amount
exceeds the budget in that account, the withdrawal fails. A warning must be given.
2. Deposit
A customer can deposit as much as possible.
3. Transfer
When transferring money, a VIP account can transfer at most 20000 and a normal account can
transfer at most 10000. It is assumed that the accounts transferring from and transferring to are all in the account.txt. If the “from” account is VIP, the charge for the transaction is 0.5%; otherwise, the
charge is 1%.
4. Display
When an account is inquired, the balance in this account is displayed.
Notice: After each transaction except inquiry, the balance should be updated in the file if the transaction succeeds.
A menu is required for the customer to login and operate the account. There are three components in the
menu.
1. Login system
When the program starts, a menu as following should prompt out.
Please input your account number:
If a valid account can be found in account.txt, the user can process to next step. Otherwise, a warning will be given and back to the account input.
Please input you account password:
|
Verify input with the password stored in the account.txt. If failed, a warning will be given and back to the account input.
2. Operation menu
After customer log into the system, a menu as following should prompt out.
1. Inquiry 2. Deposit 3. Withdraw 4. Transfer 5. Quit Please select:
|
Customer can use the bulletin number to select each operation.
Inquiry
output the balance as following
Dear Ryan, your balance is 100000.
|
Deposit
Input how much money you want to deposit
Please input the amount to save: 10000
|
Verify if it is a reasonable amount, and output the updated balance.
Dear Ryan, your balance has been updated to 110000.
|
Withdraw
Input the amount you want to withdraw
Please input the amount to withdraw: 10000 |
Verify if it is a reasonable amount, and output the updated balance. Otherwise warning must be given.
Dear Ryan, your balance has been updated to 90000.
|
Transfer
Input the target account number
Please input the target account number:
Verify if it is a valid account. If not, a warning must be prompted. Next input the amount to transfer.
Please input the amount to transfer:
Verify if it is a reasonable amount, and output the updated balance. Otherwise warning must be given.
Transfer success! Your balance has been updated to
|
After each operation, you can choose
1. Continue //Back to Operation menu
2. Quit //Terminate the program
Notice
1. Use classes and inheritance in C++.
2. Separate main function & class definition in different file.
3. Example of file input/output is demonstrated in fileio.cpp
Submission
compressed into one zip file including:
1. code(.cpp files and .h files)
2. .exe and .txt file
3. Document (one page)
User manual
Job allocation
4. Each group only needs to submit one copy
2023-11-27