COP 4331 - PowerPoint PPT Presentation

About This Presentation
Title:

COP 4331

Description:

COP 4331 OOD&P Lecture 9 Object-Oriented Analysis – PowerPoint PPT presentation

Number of Views:94
Avg rating:3.0/5.0
Slides: 18
Provided by: RoyB169
Learn more at: https://www.cse.fau.edu
Category:
Tags: cop | stative | verbs

less

Transcript and Presenter's Notes

Title: COP 4331


1
COP 4331 OODP
  • Lecture 9
  • Object-Oriented Analysis

2
Object-Oriented Analysis
  • Sample problem taken from Object-Oriented
    Modeling and Design by James Rumbaugh, et.al.,
    Prentice Hall, 1991.
  • Automated Teller Machine

3
ATM Problem Statement
  • Design the software to support a computerized
    banking network including both human cashiers and
    automatic teller machines (ATMs) to be shared by
    a consortium of banks. Each bank provides its own
    computer to maintain its own accounts and
    processes transactions against them. Cashier
    stations are owned by individual banks and
    communicate directly with their own bank's
    computers. Human cashiers enter account and
    transaction data. Automatic teller machines
    communicate with a central computer which clears
    transactions with the appropriate banks.

4
ATM Problem Statement (cont.)
  • An automatic teller machine accepts a cash card,
    interacts with the user, communicates with the
    central system to carry out the transaction,
    dispense 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 own
    computers 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.

5
Identifying Object Classes
  • Extract nouns from problem statement
  • Eliminate spurious classes
  • Candidate nouns
  • Software, Banking Network, Cashier, ATM,
    Consortium, Bank, Bank Computer, Account,
    Transaction, Cashier Station, Account Data,
    Transaction Data, Central Computer, Cash Card,
    User, Cash, Receipt, System, Recordkeeping
    Provision, Security Provision, Access, Cost,
    Customer

6
Identifying Object Classes.2
  • Characteristics of unnecessary or incorrect
    classes
  • Redundant
  • Irrelevant
  • Vague
  • Attributes
  • Operations
  • Roles
  • Implementation Constructs

7
Identifying Object Classes.3
  • Classes Eliminated
  • Vague System, Recordkeeping Provision, Security
    Provision, Banking Network
  • Redundant User
  • Irrelevant Cost
  • Attribute Account Data, Receipt, Cash,
    Transaction Data
  • Implementation Access, Software

8
Identifying Object Classes.4
  • Remaining, Good Classes
  • Account, ATM, Bank, Bank Computer, Cash Card,
    Cashier, Cashier Station, Central Computer,
    Consortium, Customer, Transaction
  • Note It is sometimes necessary to add classes
    based on domain knowledge that are not part of
    the problem statement

9
Identifying Associations
  • Associations often correspond to stative verbs or
    verb phrases including
  • Location
  • Directed actions
  • Communication
  • Ownership
  • Satisfaction of a condition

10
Identifying Associations.2
  • Candidate verb phrases
  • Banking network includes cashiers and ATMs
  • Consortium shares ATMs
  • Bank provides bank computer
  • Bank computer maintain accounts
  • Bank computer processes transaction against
    account
  • Bank owns cashier station
  • Cashier station communicates with bank computer
  • Cashier enters transaction for account

11
Identifying Associations.2
  • Candidate verb phrases (cont.)
  • ATMs communicate with bank computer
  • Central computer clears transaction with bank
  • ATM accepts cash card
  • ATM interacts with user
  • ATM dispenses cash
  • ATM prints receipt
  • System handles concurrent access
  • Banks provide software
  • Cost apportioned to banks

12
Identifying Associations.3
  • Implicit verb phrases
  • Consortium consists of banks
  • Bank holds account
  • Consortium owns central computer
  • System provides recordkeeping
  • System provides security
  • Customers have cash cards
  • Problem domain relationships
  • Cash card accesses accounts
  • Bank employs cashiers

13
Identifying Associations.4
  • Discard unnecessary or incorrect associations
  • Associations involving eliminated classes
  • Irrelevant or implementation associations
  • Actions
  • Derived associations
  • Ternary associations
  • Misnamed associations
  • Role names
  • Qualified associations
  • Seek missing associations

14
Identifying Associations.4
  • Associations involving eliminated classes
  • Costs, receipts, cash, system, software
  • Irrelevant or implementation associations
  • Concurrent access
  • Actions
  • Accepts cash card, Interacts with user
  • Ternary associations
  • Processes transaction against account
  • Derived associations
  • Misnamed associations
  • Role names
  • Qualified associations

15
Adding Attributes
  • Attributes are properties
  • But NOT other objects
  • Name
  • Card code
  • Password
  • Cash on hand
  • Date-time
  • Balance

16
Developing An Object Model
  • Draw rectangles for objects
  • Add associations
  • Add multiplicities
  • Revise for inheritance
  • Consider further revision for simplification and
    clarity

17
Use Case Diagram and Interaction Diagrams
  • Develop Use Case Diagram
  • Develop Example Interaction Diagram
Write a Comment
User Comments (0)
About PowerShow.com