关键词 >
C++ Group Project
发布时间:2020-12-28
accountNo |
accountName |
password |
Balance |
VIP |
0123 |
Ryan |
123456 |
100000.23 |
V |
0124 |
Eric |
654321 |
100000.12 |
N |
Every account number (accountNo) contains four digits. Password would be a 6-sigits number. For every account, the client can inquiry,
withdraw, save and transfer money. These transactions have
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 get 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.
- A customer can deposit as much as possible.
- 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. Inquiry
- When an account is inquired, the balance in this account is displayed.
1. Login system
When the program start, a menu as following should prompt out.
Please input your account number:
Please input you account password:
1. Inquiry2. Deposit3. Withdraw4. Transfer5. Quit
- Inquiry
output the balance as following
Dear Ryan, your balance is 100000.23
- Deposit
Input how much money you want to depositPlease input the amount to save: 10000Verify if it is a reasonable amount, and output the updated balance.Dear Ryan, your balance has been updated to 110000.23
- Withdraw
Input the amount you want to withdrawPlease input the amount to withdraw: 10000Verify if it is a reasonable amount, and output the updated balance. Otherwise warningmust be given.Dear Ryan, your balance has been updated to 90000.23
- Transfer
Input the target account numberPlease 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
1. Continue //Back to Operation menu2. Quit //Terminate the program
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
1. code(.cpp files and .h files)2. .exe and .txt file3. Document (one page)
- User manual
- Job allocation
4. Each group only needs to submit one copy