This tutorial walks you through the development of a simple ATM from use cases to code. 1 9: 13:Select Transaction Menu 11:Display Transaction Menu sp enseCa sh() LEG: Valid PIN 12:Display Transaction Menu Request the user to prepare an envelope with cash. 20 18:Cash Amount 5:returns 46:End() LEG: Cash Deposit into Checking Account 16:Enter Cash Amount for deposit 1 1 :D i rn s 14:Handle Transaction Selection 15:create 17:Enter Cash Amount for deposit re tu The PIN has matched, so give the transaction choices to the user. 20:Request Cash in Envelope Session :DEL 19:Cash Amount 47:PrintReceipt() 18:returns 21:Request Cash in Envelope Successful Ask the user to enter the cash amount for deposit. 48:Print() Date/time, Loc, Account, Amount, Balance 49:returns 1:CREATE 16 :H an dle 2: S ta rt ( ) Tra n 17 Transaction 13 sa c ti o n C o m p l e t e () : r et u rn s :End 14 :L () ogT ransa 3 :P ction() t ri n () Logger ns e tur 1 5: r E ET The customer enters the cash amount. transaction_type The Session creates the Transaction object. 45:HandleTransactionSelection() User selects the transaction. ) Transaction nt ry( Session ATM Example: Customer Initiated Use Cases (Cash Withdrawal from Checking) System ATM Controller Bank Card Reader Keypad Envelope Slot Display Cash Dispenser EventStudio System Designer 4.0 Controller ATM ou ntE Printer 1:Insert Credit Card dl eA m System Output Cash Dispenser Session start handling 9 :returns ATM Example: Customer Initiated Use Cases (Cash Deposit into Checking) Actors Primary Secondary Input Actors Actors Customer Bank Card Reader Keypad Envelope Display Slot s tu rn 4:re 6 : H an 1 tu rn s 44:Select Transaction Menu User decides to quit. ATM Card Number, PIN 9:Enter PIN Logger 34:returns 2:Credit Card Swipe EventStudio System Designer 4.0 30-Sep-07 09:03 () EventStudio System Designer 4.0 Printer The customer inserts the ATM card to start the ATM session. 4:Initialize 8:Request PIN Box Display 30-Sep-07 11:43 () 35:End() The Card Reader in the ATM detects the credit card and sends a message to the ATM object. The ATM object creates a new Session object. 5:Welcome Message 10:Handle PIN Entry Bank Log entry 37:returns Mark Transaction object for deletion 7:R ATM Card Number, PIN 6:Welcome Message System 38:HandleTransactionComplete() The ATM object has detected the start of a new session. 7:Request PIN Card Reader Keypad Envelope Slot Cash Dispenser Display 1 0: Update the Session object with the ATM card number and PIN stored on the ATM card. an dleB Ha n A welcome message is displayed to the user. 43:returns 12:re n() Compare PIN read from the card with the entered PIN es equ Request the user to enter the PIN. (1) Deposit (2) Withdraw (3) Quit lAutho Printer riza t io Does the PIN entered by the user match the PIN stored in the card? 8 :retu rn s ATM 42:returns dra wa 41:returns kReply () t Wit h 40:returns The Customer enters the PIN. Use Case and Sequence Diagram Tutorial Use Case and Sequence Diagram Tutorial Logger 11-Sep-07 22:33 () Transaction Interfaces (Cash Withdrawal from Checking) ATM Session Transaction 3:create ATM Controller 36:LogTransaction() 39:Print() Request user to select another transaction.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |