ATM Adv. SW Engineering

26
ATM Adv. SW Engineering http://www.math-cs.gordon.edu/courses/cps211/ATMExample/

Transcript of ATM Adv. SW Engineering

Page 1: ATM Adv. SW Engineering

ATM

Adv. SW Engineering

http://www.math-cs.gordon.edu/courses/cps211/ATMExample/

Page 2: ATM Adv. SW Engineering

Requirement Phase

Textual Requirement Documentation

Use Case Diagram

Page 3: ATM Adv. SW Engineering

Use Case Diagram

Page 4: ATM Adv. SW Engineering

Use Case Description

System Startup Use Case

The system is started up when the operator turns the operator switch to the "on" position. The operator will be asked to enter the amount of money currently in the cash dispenser, and a connection to the bank will be established. Then the servicing of customers can begin. <see Interaction Diagram>

System Shutdown Use Case

The system is shut down when the operator makes sure that no customer is using the machine, and then turns the operator switch to the "off" position. The connection to the bank will be shut down. Then the operator is free to remove deposited envelopes, replenish cash and paper, etc. <see Interaction Diagram>

Page 5: ATM Adv. SW Engineering

Analysis Phase

Detailed Use Case Diagram

Initial Function Tests

Analysis Classes

Page 6: ATM Adv. SW Engineering
Page 7: ATM Adv. SW Engineering

Initial Functional Test Cases(Examples)

Use Case Function Being Tested Initial System State Input Expected Output

System StartupSystem is started when the

switch is turned "on"System is off Activate the "on" switch

System requests initial cash amount

System StartupSystem accepts initial cash

amountSystem is requesting cash

amountEnter a legitimate

amountSystem is on

System StartupConnection to the bank is

establishedSystem has just been

turned onPerform a legitimate

inquiry transaction

System output should demonstrate that a connection has been established to the Bank

System ShutdownSystem is shut down when the

switch is turned "off"System is on and not

servicing a customerActivate the "off" switch System is off

System ShutdownConnection to the Bank is

terminated when the system is shut down

System has just been shut down

 Verify from the bank side that a

connection to the ATM no longer exists

SessionSystem reads a customer's ATM

cardSystem is on and not

servicing a customerInsert a readable card

Card is accepted;System asks for entry of PIN

SessionSystem rejects an unreadable

cardSystem is on and not

servicing a customerInsert an unreadable

card

Card is ejected;System displays an error screen;System is ready to start a new session

Session System accepts customer's PINSystem is asking for entry

of PINEnter a PIN

System displays a menu of transaction types

SessionSystem allows customer to

perform a transactionSystem is displaying menu

of transaction typesPerform a transaction

System asks whether customer wants another transaction

Page 8: ATM Adv. SW Engineering

Analysis Class

Page 9: ATM Adv. SW Engineering

Design Phase

CRC CardsClass DiagramState Charts

Interaction Diagrams

Page 10: ATM Adv. SW Engineering

Class Diagram

Page 11: ATM Adv. SW Engineering
Page 12: ATM Adv. SW Engineering

State Chart for One Session

Page 13: ATM Adv. SW Engineering

State Chart for One Session (cont.)

Italicized operations are Unique to each particular type of transaction

Page 14: ATM Adv. SW Engineering

System Startup Sequence Diagram

Page 15: ATM Adv. SW Engineering

System Shutdown Sequence Diagram

Page 16: ATM Adv. SW Engineering

Session Sequence Diagram

Page 17: ATM Adv. SW Engineering

Transaction Sequence Diagram

Page 18: ATM Adv. SW Engineering

Withdrawal Transaction Collaboration

Page 19: ATM Adv. SW Engineering

Deposit Transaction Collaboration

Page 20: ATM Adv. SW Engineering

Transfer Transaction Collaboration

Page 21: ATM Adv. SW Engineering

Inquiry Transaction Collaboration

Page 22: ATM Adv. SW Engineering

Invalid PIN Extension Collaboration

Page 23: ATM Adv. SW Engineering

Detailed Design & Implementation

Detailed Class Diagram

Package Diagram

Code

Page 24: ATM Adv. SW Engineering

All other classes from class diagram must be done in the same way.

Page 25: ATM Adv. SW Engineering

Package Diagram

Page 26: ATM Adv. SW Engineering