Professional Documents
Culture Documents
AUTOMATED
AUTOMATED
TELLER
TELLER
MACHINE
MACHINE
Source:OBJECT-ORIENTED
MODELING AND DESIGN
James Rumbaugh, Michael Blaha,
William Premerlani, Frederick Eddy,
William Lorensen
Cashier
Station
Cash card
ATM classes
Transaction
identified from
log
knowledge of
problem
domain Communications
line
Bad Classes
vague irrelevant
attribute
System Cost
Receipt
Account
Security data
provision Cash
implementation
Recordkeeping Transaction
provision data Access
Transaction
Banking log
redundant Software
network
User Communications
line
Eliminating
unnecessary
classes from Good Classes
ATM problem
Bank Cash
Account ATM Bank Cashier
computer card
Cashier Central
Consortium Customer Transaction
station computer
Dictionary Data
dictionary for
ATM classes
ATM - a station that allows customers to enter their own transactions using cash
cards as identification. The ATM intercats with the customer to gather transaction
information, sends the transaction information to the central computer for validation
and processing, and dispenses cash to the user. We assume that an ATM need not
operate independently of the network.
Bank - a financial institution that holds accounts for customers and that issues cash
cards authorizing access to accounts over the ATM network.
Bank computer - the computer owned by a bank that interfaces with the ATM
network and the bank's own cashier stations. A bank may actually have its own
internal network of computers to process accounts, but we are only concerned with
the one that talks to the network.
Cash card - a card assigned to a bank customer that authorizes access of accounts
using an ATM machine. Each card contains a bank code and a card number, most
likely coded in accordance with national standards on credits cards and cash cards.
The bank code uniquely identifies the bank within the consortium. The card number
determines the accounts that the card can access. A card does not necessarily
access all of a customer's accounts. Each cash card is owned by a single customer,
but multiple copies of it may exist, so the possibility of simultaneous use of the same
card from different machines must be considered.
Customer - the holder of one or more accounts in a bank. A customer can consist of
one or more persons or corporations; the correspondence is not relevant to this
problem. The same person holding an account at a different bank is considered a
different customer.
Consists
of Holds Has
Consortium Bank code Bank Account Customer
Employs Concerns
Owns Owns
Owns
Communicates
Central with Bank
Cashier Has
computer computer Accesses
Communicates Concerns
Entered by
with
Communicates
with
Cashier Entered on Cashier
station transaction
ATM Cashier
cash on hand station Cashier Remote
dispensed transaction transaction
Communicates Communicates
with with Entered by
station station
code Cashier
Communicates code
name
Central with Bank
Bank Owns
computer computer Authorized
code
Employs by
Update
amount
Entry Cashier Remote kind
station transaction transaction
Concerns
Entered by
ATM Cashier Started by
cash on hand station
dispensed Cashier
name
ATM Problem:
The model we present is small and would not
require breakdown into modules, but it could serve
as a core for a more detailed model.
DYNAMIC MODELING
Format for
Interface ATM
interface
1 2 3
>Messages to user
> 4 5 6 CLEAR
7 8 9 CANCEL
* 0 # ENTER
The ATM asks the user to insert a card; the user inserts a cash card.
The ATM accepts the card and reads its serial number.
The ATM requests the password; the user enters "1234".
The ATM verifies the serial number and password with the consortium; the
consortium checks it with bank "39" and notifies the ATM of acceptance.
The ATM asks the user to select the kind of transaction (withdrawal, deposit,
transfer, query); the user selects withdrawal.
The ATM asks for the amount of cash; the user enters $100.
The ATM verifies that the amount is within predefined policy limits and asks the
consortium to process the transaction; the consortium passes the request to
the bank, which eventually confirms success and returns the new account
balance.
The ATM dipenses cash and asks the user to take it; the user takes the cash.
The ATM asks whether the user wants to continue; the user indicates no.
The ATM prints a receipt, ejects the card, and asks the user to take them; the
user takes the receipt and the card.
The ATM asks the user to insert a card.
Normal
ATM
scenario
The ATM asks the user to insert a card; the user inserts a cash card.
The ATM swallows the card and reads its serial number.
The ATM requests the password; the user enters "9999".
The ATM verifies the serial number and password with the consortium, which
rejects it after consulting the appropriate bank.
The ATM indicates a bad password and asks the user to renter it; the user
enters "1234" which the ATM successfully verifies with the consortium.
The ATM asks the user to select the kind of transaction; the user selects
withdrawal.
The ATM asks for the amount of cash; the user has a change of mind and hits
"cancel".
The ATM ejects the card and asks the user to take it; the user takes it.
The ATM asks the user to insert a card.
ATM
scenario
with
exceptions
User ATM Consortium Bank
insert card actor
request password (active object) passive object
enter password
verify account
verify card with bank
bank account OK
account OK object
request kind
enter kind
request amount
enter amount
process transaction
process bank transaction state
bank transaction succeed }
transaction succeed
dispense cash event
request take cash
take cash
request continuation
terminate
print receipt Event trace
eject card for ATM
scenario
request take card
take card
display main screen
insert card
enter password, enter kind
enter amount
By scanning a take cash, take card
cancel, terminate, continue
particular column
in the trace, we User ATM
can see the events display main screen
that directly affect unreadable card message
a particular object. request password
request kind, request amount transaction succeed
Only these events canceled message transaction failed
can appear in the eject card, failure message account OK
dispense cash, request take cash bad account
state diagram for request continuation bad password
the object. print receipt, request take card bad bank code
bad account message
verify account
bad bank code message
process transaction
[good code]
bad bank account
/ bad account
do: verify card with bank
bad bank password
/ bad password
bank transaction failed bank transaction succeed
/ transaction failed / transaction successed bank account OK
/ account OK
State diagram
for class
Consortium
process bank transaction verify card with bank
[invalid]
/ bad bank account
do: update account do: verify card number
[valid]
[invalid]
/ bad bank password
do: verify password
[failure] [succeed]
/ bank transaction failed / bank transaction successed [valid]
/ bank account OK
State diagram
for class
Bank
Wait for Interrput
network responds
network do: canceled
response message
insert card enter
cancel
[readable] password
Main screen do: request do: verify
do: display password account
main screen bad
insert card password
account OK
[unreadable]
take Unreadable
card do: unreadable cancel bad
card message account do: request kind
cancel
Card ejected Cancel enter
do: eject card; do: canceled
kind
request take card message
cancel
do: request
Finish amount
do: bad account message
do: print receipt
✘ Inputs events that only affect the flow of control, such as cancel, terminate,
or continue, do not supply input values.
bank code,
Cash card code
card
password,
ATM
transaction kind, Input and
account type, output values
amount for ATM
system boundary system
User cash,
receipt,
messages
Building Data Flow Diagrams
A data flow diagram is usually constructed in layers. The top layer may consist of a
single process.
Input and output values are supplied and consumed by external objects, such as
User and Cash card.
Account
bank code,
Cash balance
card code
card
perform generate
read input
transaction outputs
password,
Top level transaction kind, cash,
data flow diagram account type, receipt,
for ATM amount messages
User
Consortium
balance
Function
description for
update account
function
Adding Operations
Actions and activities in the state diagram may be functions. These functions having
interesting computational structure should be defined as operations on the object
model.
We can define:
Shopping list operations permit considering future possible needs while the
organization of classes is still fluid.
They provide an opportunity to broaden the base of an object definition beyond the
narrow needs of the immediate problem.
account :: close
account :: authorize_cash_card (cash_card_authorization)
bank :: create_savings_account (customer) -> account
bank :: create_checking_account (customer) -> account
bank :: create_cash_card (customer) -> cash_card_authorization
cash_card_authorization :: remove_account (account)
cash_card_authorization :: close
SYSTEM DESIGN
Identifying Inherent Concurrency
If the ATM statement contained the requirement that each machine should
continue to operate locally in the event of a central system failure (perhaps
with reduced limits on translations), then we would have no choice but to
include a CPU in each ATM machine with a full control program.
If the ATM is controlled directly by a central computer, then the ATM object
can be folded together with the bank transaction object as a single task.
Cashier
ATM
Consortium Cashier
phone pemanent station
Cash lines data store Database
card station
code Account
phone
Customer
lines
User bank
Card
user code
authorization
interface
The consortium computer communicates with all the ATM stations and with
all the bank computers.
OBJECT DESIGN
Procedure-driven System