1234 4321 The Little Company 100000The first account set up would have account number 1234, PIN 4321, name "The Little Company", and an initial balance of $100000.
2345 5432 One Good Employee 2000
3456 6543 Another Good Employee 4000
4567 7654 A Helpful Nanny 200
5678 8765 The Corner Store 20000
You can assume that the file has the correct format -- numbers where there are supposed to numbers, strings where there are supposed to be strings. Your program should, however, be prepared to accept a file of arbitrary length -- four lines as in the above, or ten, or a hundred.
Some observations about this interface:
Enter account number
1111
Invalid account number
Enter account number
1234
Enter PIN
2222
Invalid PIN
Enter account number
4321
Invalid account number
Enter account number
1234
Enter PIN
4321
Welcome, The Little Company
Enter B for balance inquiry, L for last transaction, H for transaction history, T for funds transfer
oops
Invalid request type
Enter account number
1234
Enter PIN
4321
Welcome, The Little Company
Enter B for balance inquiry, L for last transaction, H for transaction history, T for funds transfer
B
Balance: $100000
Enter account number
1234
Enter PIN
4321
Welcome, The Little Company
Enter B for balance inquiry, L for last transaction, H for transaction history, T for funds transfer
L
Last transaction: initial balance in the amount of $100000
Enter account number
1234
Enter PIN
4321
Welcome, The Little Company
Enter B for balance inquiry, L for last transaction, H for transaction history, T for funds transfer
H
Transaction history:
initial balance in the amount of $100000
Enter account number
1234
Enter PIN
4321
Welcome, The Little Company
Enter B for balance inquiry, L for last transaction, H for transaction history, T for funds transfer
T
Enter account number to transfer to
1111
Invalid account number
Enter account number
1234
Enter PIN
4321
Welcome, The Little Company
Enter B for balance inquiry, L for last transaction, H for transaction history, T for funds transfer
T
Enter account number to transfer to
2345
Enter amount to transfer
1000000
Invalid amount
Enter account number
1234
Enter PIN
4321
Welcome, The Little Company
Enter B for balance inquiry, L for last transaction, H for transaction history, T for funds transfer
T
Enter account number to transfer to
2345
Enter amount to transfer
2000
Confirm transfer of $2000 to account 2345: Enter Y to confirm, N to cancel
N
Request cancelled
Enter account number
1234
Enter PIN
4321
Welcome, The Little Company
Enter B for balance inquiry, L for last transaction, H for transaction history, T for funds transfer
T
Enter account number to transfer to
2345
Enter amount to transfer
2000
Confirm transfer of $2000 to account 2345: Enter Y to confirm, N to cancel
Y
Funds transferred
Enter account number
1234
Enter PIN
4321
Welcome, The Little Company
Enter B for balance inquiry, L for last transaction, H for transaction history, T for funds transfer
T
Enter account number to transfer to
3456
Enter amount to transfer
1000
Confirm transfer of $1000 to account 3456: Enter Y to confirm, N to cancel
Y
Funds transferred
Enter account number
1234
Enter PIN
4321
Welcome, The Little Company
Enter B for balance inquiry, L for last transaction, H for transaction history, T for funds transfer
H
Transaction history:
transfer to account 3456 in the amount of $1000
transfer to account 2345 in the amount of $2000
initial balance in the amount of $100000
Enter account number
3456
Enter PIN
6543
Welcome, Another Good Employee
Enter B for balance inquiry, L for last transaction, H for transaction history, T for funds transfer
T
Enter account number to transfer to
4567
Enter amount to transfer
400
Confirm transfer of $400 to account 4567: Enter Y to confirm, N to cancel
Y
Funds transferred
Enter account number
3456
Enter PIN
6543
Welcome, Another Good Employee
Enter B for balance inquiry, L for last transaction, H for transaction history, T for funds transfer
B
Balance: $4600
Enter account number
3456
Enter PIN
6543
Welcome, Another Good Employee
Enter B for balance inquiry, L for last transaction, H for transaction history, T for funds transfer
H
Transaction history:
transfer to account 4567 in the amount of $400
transfer from account 1234 in the amount of $1000
initial balance in the amount of $4000
Enter account number
3456
Enter PIN
6543
Welcome, Another Good Employee
Enter B for balance inquiry, L for last transaction, H for transaction history, T for funds transfer
L
Last transaction: transfer to account 4567 in the amount of $400