Download as pdf or txt
Download as pdf or txt
You are on page 1of 14

Example: ATM

[Rumbaugh et al 1991]

2006 A.Borgida

UML -- 1

Design the software to support a computerized banking network


including both human cashiers and ATMs to be shared by a consortium of banks.Each bank provides its own computer to maintain its own accounts and process transactions against them. Cashier stations are owned by individual banks and communicate directly with their own banks computers. Human cashiers enter account and transaction data. Automatic teller machines communicate with a central computer which clears transactions with the appropriate banks. An automatic teller machine accepts a cash card, interacts with the user, communicates with the central system to carry out the transaction, dispenses cash, and prints receipts. The system requires appropriate recordkeeping and security provisions. The system must handle concurrent access to the same account correctly. The banks will provide their own software for their cmputers; you are to design the software for the ATMs and the network. The cost of the shared system will be apportioned to the banks according to the number of customers with cash cards.
2006 A.Borgida

UML -- 2

2006 A.Borgida

UML -- 3

Methodology
Object modeling Interaction Diagrams for Use Cases State or Activity Diagrams

2006 A.Borgida

UML -- 4

Methodology
Object modeling
identify objs and classes: noun analysis + pruning prepare data dictionary identify associations,aggregations identify attributes of objects and associations organize & simplify using generalization/inheritance iterate

2006 A.Borgida

UML -- 5

Nouns -> tentative classes


Design the software to support a computerized banking network
including both human cashiers and ATMs to be shared by a consortium of banks.Each bank provides its own computer to maintain its own accounts and process transactions against them. Cashier stations are owned by individual banks and communicate directly with their own banks computers. Human cashiers enter account data and transaction data. Automatic teller machines communicate with a central computer which clears transactions with the appropriate banks. An automatic teller machine accepts a cash card, interacts with the user, communicates with the central system to carry out the transaction, dispenses cash, and prints receipts. The system requires appropriate recordkeeping and security provisions. The system must handle concurrent access to the same account correctly. The banks will provide their own software for their cmputers; you are to design the software for the ATMs and the network. The cost of the shared system will be apportioned to the banks according to the number of customers with cash cards.

communicn line, transaction log


2006 A.Borgida

UML -- 6

Bad classes
vague
security provision, system, recordkeeping provision,banking network attribute account data, receipt, cash, transaction data redundant user irrelevant cost implementation transaction log, access, software, communication line LEFT WITH account, atm, bank, bank computer, cash card, cashier, cashier station, central computer, consortium, customer, transaction
2006 A.Borgida

UML -- 7

2006 A.Borgida

UML -- 8

2006 A.Borgida

UML -- 9

Final object model

2006 A.Borgida

UML -- 10

Methodology(2)
Dynamic modeling
prepare scenarios of typical interactions identify events (agent,...) describe interaction diagrams build state diagram for each object incoming arrow corresponds to event causing transition to this new state outgoing arrow corresponds to action being taken in this state life gets interesting when you (i) try to make the diagram nite by discovering loops, and (ii) merge multiple scenarios (if necessary, build activity diagrams to show coordinated actions)

2006 A.Borgida

UML -- 11

Sequence Interaction Diagram

2006 A.Borgida

UML -- 12

State chart for Bank

2006 A.Borgida

UML -- 13

State chart for ATM

2006 A.Borgida

UML -- 14

You might also like