Sie sind auf Seite 1von 40

ATM System use case model

Withdraw Funds include

Query Account

include

Validate PIN

include

ATM Customer

Transfer Funds Add Cash

Startup

Shutdown

Operator

Conceptual static model for ATM System - Problem Domain


1
Bank Has

1..*

ATM

Maintains ATM

Operator

1
ATMCustomer

1
CardReader

1
CashDispenser

1
ReceiptPrinter

1 Reads 1
ATMCard

1 Dispenses 1
ATMCash

1 Prints 1
Receipt

ATM System context diagram


1

external I/O device CardReader

1..*
Inputs To Outputs To

1 1

Operator

1 1

external output 1..* device ReceiptPrinter

Outputs To

1 system Banking System 1


Interacts With 1..*

1 1 1

1 ATM Customer 1 external output device CashDispenser external user ATMCustomer

external user Operator

Interacts With

1..*
Outputs To

1..*

Conceptual static model for ATM System - entity classes


entity Bank

1 1

Maintains

1..*

entity ATMInfo

Manages

Has Identifies

1..*
Owns entity Customer Provides 1..* Access to Owns

1..* 0..1 entity *


DebitCard

1..*

1..* 1,2
Modifies

* *
entity ATMTransaction

entity Account

entity CardAccount entity Checking Account entity Savings Account

entity Withdrawal Transaction

entity Query Transaction

entity Transfer Transaction

entity PINValidation Transaction

Conceptual static model for ATM System


entity Bank bankName: String bankAddress: String entity Customer customerName: String customerId: String customerAddress: String entity DebitCard cardId: String PIN: String startDate: Date expirationDate: Date status:Integer limit: Real total: Real entity SavingsAccount

entity Account accountNumber: String balance: Real

entity CheckingAccount

lastDepositAmount: Real

interest: Real

Conceptual static model for ATM System


entity ATMTransaction transactionId: String cardId: String PIN: String date: Date time: Time status: Integer entity PINValidationTransaction

startDate: Date expirationDate: Date

entity WithdrawalTransaction accountNumber: String amount: Real balance: Real

entity QueryTransaction accountNumber: String balance: Real lastDepositAmount: Real

entity TransferTransaction fromAccountNumber: String toAccountNumber: String amount: Real

Conceptual static model for ATM System


entity CardAccount cardId: String accountNumber: String

entity ATMInfo ATMId: String ATMLocation: String ATMAddress: String

entity ATMCash cashAvailable: Integer fives: Integer tens: Integer twenties: Integer

entity ATMCard cardId: String startDate: Date expirationDate: Date

ATM System - major subsystems


external output device ReceiptPrinter 1 system Banking System external input/ output device CardReader 1 1 1 1 1 external output device CashDispenser subsystem ATMClient Subsystem 1 1..* 1 subsystem BankServer Subsystem external user 1 Operator

1 1

external user ATMCustomer

ATM Subsystem Packaging of Use Cases


subsystem ATMClientSubsystem subsystem ATMServerSubsystem

Client Validate PIN

include

Server Validate PIN

include Client Withdraw Funds include Add Cash Client Query Account include Client Transfer Funds Shutdown include Server Transfer Funds include Server Query Account Server Withdraw Funds

include

Startup

ATM System external classes and interface classes


system BankingSystem 1 external input/ output device 1 CardReader 1 1 external output device ReceiptPrinter 1 ATM Customer 1 external output device CashDispenser 1 1 output device interface CashDispenser Interface external user ATMCustomer 1 1 CustomerInterface user interface 1 1 output device interface ReceiptPrinter Interface user interface 1 OperatorInterface 1 external user Operator 1 1 1

input/output device interface CardReader Interface

Operator

subsystem ATMClient Subsystem

ATM Client subsystem classes


state dependent control

I/O device interface CardReader Interface ATMControl

user interface OperatorInterface

entity output device interface ReceiptPrinter Interface ATMTransaction user interface entity ATMCard output device interface CashDispenser Interface CustomerInterface

entity ATMCash

Collaboration diagram: ATM Client - Validate PIN use case

subsystem :BankServer

external I/O device :CardReader

1: Card Reader Input

I/O device interface :CardReader Interface

1.2: Card Inserted 2.5: Validate PIN (Customer Info) 2.6 [Valid]: Valid PIN

1.1: Card Input Data

state dependent control :ATMControl

entity :ATMCard 2.4: PIN Entered (Customer Info) 1.3: Get PIN 2.2: Card Data 1.4: Pin Prompt 2.8: Selection Menu 2: PIN Input :ATMCustomer 2.1: Card Request 2.7: Display Menu 2.3: Customer Info 2.7a: Update Status

user interface :CustomerInterface

entity :ATMTransaction

Sequence diagram for Validate PIN use case


:ATM Customer 1: Card Reader Input I/O device interface :CardReaderInterface entity :ATMCard state dependent control :ATMControl user interface :CustomerInterface entity :ATM Transaction Subsystem :BankServer

1.1: Card Input Data 1.2 : Card Inserted 1.3: Get PIN

1.4: PIN Prompt 2: PIN Input 2.1: Card 2.2: Card Request Data 2.3: Customer Info 2.4: PIN Entered 2.5: Validate PIN 2.6[Valid]: Valid PIN 2.7: Display Menu 2.7a: Update Status 2.8: Selection Menu

Statechart for ATM Control - Validate PIN use case


1.2: Card Inserted / 1.3: Get PIN

Idle
Entry/ Display Welcome

Waiting for PIN 2.4: PIN Entered / 2.5: Validate PIN Validating PIN

2.6: Valid PIN / 2.7: Display Menu, 2.7a: Update Status Waiting for Customer Choice

Collaboration diagram ATM Server - Validate PIN use case


subsystem : ATMClient V1: PIN Validation Request (Card Id, PIN) V6: PIN Validation Response (Status)

business logic : PINValidation TransactionManager V2: Validate (Card Id, PIN)

V3: Card Data V4: Read (Card Id)

V5: Account Numbers

entity : DebitCard

entity : CardAccount

Collaboration diagram: ATM Client - Withdraw Funds use case


subsystem :BankServer 3.4: Request Withdrawal (Transaction Details) 3.11b: ACK Cash Dispensed 3.5: Withdrawal OK (Cash Details) output device interface :CashDispenser Interface external output device :CashDispenser

3.9: Dispenser Output

3.17: Card Reader Output external I/O device :CardReader

3.6: Dispense Cash (Cash details) 3.7: Cash 3.8: Cash Response 3.18: Card Withdrawal I/O device Ejected Amount interface 3.10: Cash :CardReader entity Dispensed Interface :ATMCash 3.16: state dependent Eject control :ATMControl 3.3 Withdrawal Selected (Transaction details) 3.15: Receipt Printed 3.6a: Update Status (Cash Details) 3.11: Print Receipt

3.4a.1 : Wait Prompt 3.11a.1: Cash Dispensed Prompt 3.20: Card Ejected Prompt

3.4a: Display Wait 3.11a: Display Cash Dispensed 3.19: Display Ejected 3.1: Customer Selection 3.2: Transaction details

user interface :Customer Interface :ATM Customer 3: Selection Input

entity :ATM Transaction

3.12:Transaction Request output device interface :ReceiptPrinter 3.13: Interface Transaction Data

external output device :ReceiptPrinter 3.14: Printer Output

Sequence diagram - ATM Client Withdraw Funds use case


:ATM Customer

I/Odi :CardReaderInterface 3: Selection Input

sdc user interface :ATMControl :CustomerInterface

entity :ATM Transaction 3.1: Customer Selection

odi :Cash Dispenser Interface

entity :ATMCash

odi :Receipt Printer Interface

subsystem :BankServer

3.2: Transaction Details 3.3: Withdrawal Selected 3.4: Request Withdrawal 3.4a: Display Wait 3.4a.1: Wait Prompt 3.5: Withdrawal OK 3.6: Dispense Cash 3.6 a: Update Status 3.7: Cash Withdrawal Amount 3.8: Cash Response 3.9: Dispenser Output 3.10: Cash Dispensed 3.11: Print Receipt 3.11a: Display Cash Dispensed 3.11b: 3.11a.1: Cash Dispensed Prompt 3.14: Printer Output 3.17: Card Reader Output 3.16: Eject 3.15: Receipt Printed

ACK Cash Dispensed

3.12: Transaction Request 3.13: Transaction Data

3.18: Card Ejected 3.20: Card Ejected Prompt

3.19: Display Ejected

Statechart for ATM Control - Withdraw Funds use case


Idle
Entry / Display Welcome After (Elapsed Time) [Closedown not Requested]

Terminating 3.18: Card Ejected / 3.19: Display Ejected Ejecting 3.15: Receipt Printed / 3.16: Eject Waiting For Customer Choice 3.3: Withdrawal Selected / 3.4: Request Withdrawal, 3.4a: Display Wait Printing

3.10: Cash Dispensed / 3.11: Print Receipt, 3.11a: Display Cash Dispensed 3.11b: ACK Cash Dispensed Dispensing

Processing Withdrawal

3.5: Withdrawal Ok / 3.6: Dispense Cash, 3.6a: Update Status

Collaboration diagram ATM Server - Withdraw Funds use case


subsystem :ATMClient W1: Withdrawal Request (Transaction Details) W8: Withdrawal Response (Cash Details)

business logic :WithdrawalTransaction Manager W4: Debit (Account #,Amount) W2: Check Daily Limit (Card Id,Amount)

W5: Account W6: Update Daily Total Data (Card Id, Amount) entity :Account

W3: Daily Limit Response

W7: Log Transaction

entity :DebitCard

entity :TransactionLog

Top level statechart for ATM Control

Closed Down
Entry / Display System Down Startup 1.2: Card Inserted / 1.3: Get PIN Closedown

Insufficient Cash / Eject After(Elapsed Time) [Closedown Requested]

Idle
Entry / Display Welcome After(Elapsed Time)[Closedown not Requested]

Processing Customer Input

Third Invalid, Stolen / Confiscate,Update Status Cancel / Eject, Display Cancel

Terminating Transaction

Transfer Selected / Request Transfer, Display Wait Query Selected / Request Query, Display Wait

Rejected / Eject, Display Apology Transfer Ok / Print Receipt, Update Status Processing Transaction Query Ok / Print Receipt, Update Status

3.3: Withdrawal Selected / 3.4: Request Withdrawal, 3.4a: Display Wait

3.5: Withdrawal Ok / 3.6: Dispense Cash, 3.6a Update Status

Statechart for ATM Control Processing Customer Input superstate


1.2: Card Inserted / 1.3: Get PIN Processing Customer Input

Idle
Entry/ Display Welcome Cancel / Eject, Display Cancel

Waiting for PIN 2.4: PIN Entered / 2.5: Validate PIN Invalid PIN / Invalid PIN Prompt, Update Status

Validating PIN

Third Invalid, Stolen / Confiscate, Update Status

2.6: Valid PIN / 2.7: Display Menu, 2.7a: Update Status Waiting for Customer Choice Transfer Selected / Request Transfer, Display Wait

3.3: Withdrawal Selected / 3.4: Request Withdrawal, 3.4a: Display Wait

Query Selected / Request Query, Display Wait

Statechart for ATM Processing Transaction superstate

Processing Transaction Transfer Selected / Request Transfer, Display Wait Processing Transfer

Rejected / Eject, Display Apology

Transfer Ok / Print Receipt, Update Status Query Ok / Print Receipt, Update Status

Query Selected / Request Query, Display Wait 3.3: Withdrawal Selected / 3.4: Request Withdrawal, 3.4a: Display Wait

Processing Query

Processing Withdrawal

3.5: Withdrawal Ok / 3.6: Dispense Cash, 3.6a: Update Status

Statechart for ATM Control - Terminating Transaction superstate


Closed Down
Entry / Display System Down After(Elapsed Time)[Closedown Requested]

Idle
Entry / Display Welcome

After(Elapsed Time)[Closedown not Requested]

Terminating Transaction Terminating Cancel / Eject, Display Cancel Third Invalid, Stolen / Confiscate Confiscating Ejecting 3.15: Receipt Printed / 3.16: Eject Printing Insufficient Cash / Eject Card Confiscated / Display Confiscated 3.18: Card Ejected / 3.19: Display Ejected

Rejected / Eject, Display Apology

Transfer Ok / Print Receipt, Update Status Query Ok / Print Receipt, Update Status 3.5: Withdrawal Ok / 3.6: Dispense Cash, 3.6a: Update Status

3.10: Cash Dispensed / 3.11: Print Receipt, 3.11a: Display Cash Dispensed 3.11b: ACK Cash Dispensed Dispensing

Consolidated collaboration diagram for ATM Client subsystem


subsystem :BankServer ATM Transactions Card Reader Input client subsystem :ATMClient I/O device interface :CardReader Interface Card Input Data entity :ATMCard Customer events (Transaction details) Card Data Card Request Update Transaction Status (Cash Details), Update PIN Status output device interface :CashDispenser Interface Cash Withdrawal Amount state dependent control :ATMControl Cash Dispensed Cash Response Bank Responses

external I/O device :CardReader

Card Reader Output

Card Inserted , Card Ejected, Card Confiscated

Dispense Cash (Cash details)

Dispenser Output external output device :CashDispenser

Eject, Confiscate

entity :ATMCash Cash Added user interface :Operator Interface Operator Information

Start Up, Closedown

Operator Input Print Receipt Receipt Printed Printer Output

:Operator

Display Prompts Customer Input

user interface :CustomerInterface

Customer Info. , Customer Selection

entity :ATM Transaction

Transaction Data

Display Information :ATMCustomer

Transaction details

Transaction Request

output device interface :ReceiptPrinter Interface

external output device :ReceiptPrinter

Refined static model ATM Client subsystem

user interface Customer Interface Reads Updates

device interface CardReader Interface Notifies Controls Startup, Close

device interface CashDispenser Interface

device interface ReceiptPrinter Interface Dispenses

entity ATM Card

state dependent control ATMControl


Updates
entity

user interface Operator Interface Replenishes Controls

entity ATM Cash

Notifies

Creates

ATM Transaction

Reads

entity Withdrawal Transaction

entity Query Transaction

entity Transfer Transaction

entity PINValidation Transaction

Consolidated collaboration diagram for Bank Server subsystem


subsystem :ATMClient Bank Responses server subsystem :BankServer ATM Transactions PIN Validation Request

coordinator :Bank TransactionServer

Transfer Response

Query Transaction Transfer Transaction

Query Response

business logic :Transfer TransactionManager

Account Data

Read

Withdraw Response business logic :Query Transaction Read Manager

Withdraw, Confirm, Abort

PIN Validation Response business logic :PINValidation TransactionManager Check, Update Validate Read

business logic :Withdrawal TransactionManager

Account Data

Debit, Credit, Read

Account Data Account Data Debit, Credit, Read Log

Account Data Log Log entity :TransactionLog Debit, Credit, Read

Account Data

Debit, Credit, Read Daily Limit Response Card Data entity :DebitCard Account Numbers entity :CardAccount

entity :Checking Account

entity :SavingsAccount

Subsystem design - high level collaboration diagram for ATM System


external I/O device :CardReader cardReader Input system :BankingSystem customerInput

cardReader Output

client subsystem :ATMClient

ATM Transactions

display Information
:ATMCustomer

Bank Responses

server subsystem :BankServer

operator Input

operator Information

printer Output

dispenser Output

external output device : ReceiptPrinter


:Operator

external output device : CashDispenser

Subsystem interfaces - high level concurrent collaboration diagram for ATM System
external I/O device :CardReader cardReader Input system :BankingSystem

cardReader Output

customerInput

client subsystem :ATMClient

ATMTransaction

display Information
:ATMCustomer

bankResponse

server subsystem :BankServer

operator Input

operator Information

printer Output

dispenser Output

external output device : ReceiptPrinter


:Operator

external output device : CashDispenser

Task Architecture - initial concurrent collaboration diagram for ATM Client subsystem
subsystem :BankServer ATM Transaction Card Reader Input client subsystem :ATMClient asynchronous I/O device interface :CardReader Interface Card Input Data data abstraction :ATMCard bankResponse

asynchronous I/O device :CardReader

Card Reader Output

Card Inserted , Card Ejected, Card Confiscated Eject, Confiscate control clustering :ATMController Customer events (Transaction details)

Dispenser Output passive output device :CashDispenser

Cash Withdrawal Amount Cash Response Start Up, Closedown

data abstraction :ATMCash Cash Added user interface :Operator Interface Operator Input

Card Data

Card Request Update Transaction Status (Cash Details), Update PIN Status, Transaction Request Transaction Data

Operator Information :Operator

Display Prompts Customer Input

user interface :CustomerInterface

Customer Info. , Customer Selection

data abstraction :ATM Transaction

Printer Output

passive output device :ReceiptPrinter

Display Information :ATMCustomer

Transaction details

Task Architecture - revised concurrent collaboration diagram for ATM Client subsystem
subsystem :BankServer ATM Transaction card Reader Input client subsystem :ATMClient asynchronous I/O device interface :CardReader Interface write (card Data) data abstraction :ATMCard bank Response

asynchronous I/O device :CardReader

card Reader Output

cardInserted , cardEjected, cardConfiscated eject, confiscate

withdrawCash (in cashAmount, out fivesToDispense, out tensToDispense, out twentiesToDispense) control clustering :ATMController data abstraction :ATMCash
addCash (in fivesAdded, in tensAdded, in twentiesAdded)

dispenser Output passive output device :CashDispenser

customerEvent (transactionDetails)

startUp, closedown

read (out Card Data)

Customer Input

user interface :CustomerInterface

Display Information :ATMCustomer

update TransactionStatus (cashDetails), updatePINStatus display (status), Prompts read (out transaction Data) updateCustomerInfo (cardData, PIN) , updateCustomerSelection data (in selection, out abstraction transactionDetails) :ATM Transaction

user interface :Operator Interface

operator Input

operator Information :Operator

printer Output

passive output device :ReceiptPrinter

ATMClient information hiding classes data abstraction ATMCard - cardNumber : String - startDate : Date - expirationDate : Date data abstraction ATMCash - cashAvailable : Integer = 0 - fives : Integer = 0 - tens : Integer = 0 - twenties : Integer = 0
+ addCash (in fivesAdded, in tensAdded, in twentiesAdded) + withdrawCash (in cashAmount, out fivesToDispense, out tensToDispense, out twentiesToDispense)

data abstraction ATMTransaction


- transactionId: String - cardId: String - PIN: String = null - selection: TransactionType - transactionData:TransactionRecord + updateCustomerInfo (cardData, PIN) + updateCustomerSelection (in selection, out transactionDetails) + updatePINStatus (status) + updateTransactionStatus (cashDetails) + read (out transaction Data)

+ write (in cardData) + read (out cardData)

device interface CashDispenserInterface

device interface ReceiptPrinterInterface

state dependent control ATMControl

+ initialize ( ) + dispenseCash (in cashAmount, out dispenseStatus)

+ initialize ( ) + printReceipt (in receiptInfo, out printerStatus)

+ processEvent (in event, out action) + currentState ( ) : State

Design of ATM Controller connectors


receive (out cardreaderMsg) asynchronous I/O device interface : CardReader Interface connector cardReader MessageBuffer send (in ATMControlRequest) send (in cardReaderMsg)

connector bankServerProxy

send (in ATMTransaction, out bankResponse)

user interface send (in ATMControlRequest) : OperatorInterface

connector ATMControl MessageQ

receive (out ATMControlRequest)

control clustering : ATMController

send (in ATMControlRequest) send (in displayPrompt) user interface : CustomerInterface receive (out displayPrompt) connector promptMessage Queue

Detailed Software Design of ATM Controller

send (in cardReaderMsg)

send(in ATMTransaction, out bankResponse)

control clustering :ATMController

printReceipt (in receiptInfo, out printStatus)

receive (out ATMControlRequest)

coordinator :ATM Coordinator

output device interface :ReceiptPrinter Interface

printerOutput

dispenseCash (in cashAmount, out dispenseStatus)

read (out transaction Data)

send (in displayPrompt) processEvent (in event, out action)


updateTransactionStatus (cashDetails), updatePINStatus (status)

state dependent control :ATMControl

output device interface :CashDispenser Interface

dispenserOutput

Delegates to

coordinator BankTransaction Server Delegates to business logic QueryTransaction Manager Reads Delegates to

Delegates to business logic PINValidationTransaction Manager

business logic TransferTransaction Manager Credits, Debits, Reads


Logs Logs Logs

business logic WithdrawalTransaction Manager

Checks, Credits, Updates Debits, Reads Credits, Debits, Validates Reads Reads Credits, Debits, Reads entity Savings Account

Queries

entity TransactionLog

entity Checking Account

entity Debit Card

entity Card Account

Owns entity Account Owns entity Customer Has

Manages entity Bank

Refined static model Bank Server subsystem

Maintains entity ATMInfo

ATM Transaction subsystem :ATMClient bankResponse server subsystem :BankServer

Concurrent collaboration diagram for Bank Server subsystem

coordinator :BankTransactionServer Transfer Transaction Query Transaction Transfer Response business logic :Transfer TransactionManager business logic :Query TransactionManager Read Read Check, Update Query Response Withdraw Response business logic :Withdrawal TransactionManager Withdraw, Confirm, Abort PIN Validation Request

PIN Validation Response business logic :PINValidation TransactionManager

Account Data

Account Data Debit, Credit, Read Account Data

Account Data Log Log Log database wrapper :TransactionLog Debit, Credit, Read

Debit, Credit, Read Account Data

Account Data

Card Data Daily Limit Response database wrapper :DebitCard

Validate Read Account Numbers database wrapper :CardAccount

database wrapper :Checking Account

Debit, Credit, Read

database wrapper :Savings Account

Bank Server information hiding classes

business logic WithdrawalTransactionManager

business logic PINValidationTransactionManager

business logic TransferTransactionManager

business logic QueryTransactionManager

+ initialize ( ) + withdraw (in accountNumber, in amount, out w_response) + confirm (accountNumber, amount) + abort (accountNumber, amount)

+ initialize ( ) + validatePIN (in cardId, in PIN, out v_response)

+ initialize ( ) + transfer ( in fromAccountNumber, in toAccountNumber, in amount, out t_response)

+ initialize ( ) + query (in accountNumber, out q_response)

database wrapper TransactionLog

+ read (out transaction ) + log (in transaction )

Bank Server information hiding classes

database wrapper DebitCard database wrapper CardAccount + create (cardId) + validate (cardId, PIN) + updatePIN (cardId, PIN) + checkDailyLimit (cardId, amount) + updateDailyTotal (cardId, amount) + updateExpirationDate (cardId, expirationDate) + updateCardStatus (cardId, status) + updateDailyLimit (cardId, newLimit) + clearTotal (cardId) + read (in cardId, out PIN, out expirationDate, out status, out limit, out total) + delete (cardId)

+ read ( in cardId, out accountNumber) + update (in cardId, in accountNumber)

Bank Server information hiding classes database wrapper Account

+ readBalance (accountNumber): Real + credit (accountNumber, amount) + debit (accountNumber, amount) + open (accountNumber) + close (accountNumber)

database wrapper CheckingAccount

database wrapper SavingsAccount

+ readLastDepositAmount (accountNumber) : Real

+ addInterest (accountNumber, interestRate) + readCumulativeInterest (accountNumber) : Real

subsystem :ATMClient

ATM Transaction bankResponse

Concurrent collaboration diagram for Bank Server subsystem- architecture

server subsystem :BankServer

coordinator :BankTransaction Server transfer (in fromAccount#, in toAccount#, in amount, out t_response) query (in account#, out q_response)

withdraw (in account#, in amount, out w_response), confirm (account#, amount), abort (account#, amount)

validatePIN (in cardId, in PIN, out v_response)

business logic :TransferTransaction Manager

business logic :QueryTransaction Manager

business logic :Withdrawal TransactionManager


readBalance, readCumulativeInterest

business logic :PINValidation TransactionManager

readBalance, readLastDepositAmount debit (account#, amount), credit (account#, amount), readBalance

debit (account#, amount), credit (account#, amount), readBalance log (in transaction) checkDailyLimit (cardId, amount), updateDailyTotal (cardId, amount)

validate (cardId, PIN)

read (in cardId, out account#)

log (in transaction) debit (account#, amount), credit (account#, amount), readBalance

log (in transaction)

database wrapper :Checking Account

debit (account#, amount), credit (account#, amount), database readBalance wrapper :TransactionLog

database wrapper :Savings Account

database wrapper :DebitCard

database wrapper :CardAccount

Deployment diagram for Banking System

:ATMClient {1 node per ATM}

wide area network

:BankServer {1 node}