Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Send: HI
- receive HELLO (proceed)
- else show communication error
- Send: BANKACCOUNTNUMBER:#
- receive CONTINUE (proceed)
- receive STOLEN, destroy card
- receive BLOCKED, show card blocked error
- receive INVALID, show card error
- else show communication error
- Send: PIN:#,ATTEMPT:#
- receive CONTINUE (proceed)
- receive INVALID, try again
- receive BLOCKED, too many attempts, show blocked error
- else show communication error
- Send: GETBALANCE:
- receive BALANCE:#, show balance
- else show communication error
- Send: WITHDRAWREQUEST:#
- receive APPROVED (give user requested amount, send BYE)
- receive BALANCEERROR, show not enough money error
- receive OTHERERROR, show generic error message
- else show communication error
- Send: BYE:
- receive CYA, properly close socket
- else silent error, destroy socket
- Voorbeeld:
- Machine Central Computer
- HI
- HELLO
- BANKACCOUNTNUMBER:111199444
- CONTINUE
- PIN:0000,ATTEMPT:0
- CONTINUE
- WITHDRAWREQUEST:900
- APPROVED
- BYE
- CYA
Add Comment
Please, Sign In to add comment