Lecture 10: Object-Oriented Analysis (System Sequence Diagrams, Conceptual Model)
Lecture 10: Object-Oriented Analysis (System Sequence Diagrams, Conceptual Model)
Manish Parashar
parashar@ece.rutgers.edu
Department of Electrical &
Computer Engineering
Rutgers University
The Unified Analysis Process & UML
♦ Use Case - What are the domain processes ?
− Use Case Diagram
♦ high-level/expanded, essential/real
♦ Conceptual Model - What are the domain concepts, terms ?
− Class Diagram (conceptual)
♦ classes, associations, attributes
♦ System Sequence Diagram - What are the system events
and operations ?
− Interaction Diagram - Sequence Diagram
♦ Contracts - What do the system operations do ?
− Contract Specs.
parameter or
return data may be
elaborated in the
Glossary
Use-Case Model
:System
foo( x )
Requirements Glossary ...
bar( y )
system system
text events & system operations
system
use data sequence operation
cases diagrams contracts
Software
Design Model design objects
Architecture Doc.
to handle the
Design system events
Software
Dev. Plan
Project
Management
Test
Plan Development
Case
Test Environment
♦ Use Cases
− What are the domain processes ?
♦ Conceptual Model
− What are the concepts, terms ?
♦ System sequence diagrams
− What are the system events and operations ?
♦ Contracts
− What do the system operations do ?
♦ Illustrate
events from actors to systems
♦ System sequence diagrams describe scenarios
− a scenario is an instance of a use case Ivar Jacobson
− a real example of the enactment of a use case
− e.g. Process Sale
♦ Some UML notation for a sequence diagram is
shown on the next slide
Buy Items-version 1
Actor
Cashier :System
endSale()
: Cashier :System
makeNewSale(
Simple cash-only Process Sale scenario: )
change due,
receipt
ECE 452 - Introduction to Software Engineering
Naming System Events and Operations
:System
: Cashier
better name
enterItem(itemID, quantity)
scan(itemID, quantity)
worse name
♦ Conceptual Model
− illustrates meaningful concepts
− most important artifact in OO analysis
− need use cases as input
♦ but can develop uses cases as you do conceptual model
♦ Question:
− Provide names for the uses cases you found
♦ let's share this information now (use whiteboard)
♦ Conceptual Model
− created for the use cases of the current cycle in the
language of the problem domain
♦ Must identify
− concepts - objects in our system
− associations between concepts
♦ is part of, contains, manages, is-a, ...
− attributes of concepts
♦ instance variables needed to hold state
ECE 452 - Introduction to Software Engineering
Conceptual Modeling...
♦ Associations
− less important than identifying concepts
− show only “need-to-know” association (avoid
redundant or derivable associations)
− name, multiplicity, navigability
− multiple associations
♦ Attributes
− Attributes Vs. Concepts
♦ keep attributes simple
♦ if in doubt define it as a concept
♦ no attributes as foreign keys (use associations)
1.. * *
Stocked-in
Association Contained-in
1 1
Sale Store
date
− symbol: Sale time
− definition
represents the event "A sale represents the event concept's definition
of a purchase transaction. It
of a purchase has a date and time."
sale-4
rank
− symbol: Card suit
− definition:
represents one card A card represents one of the
entities to make up a hand concept's definition
in a poker deck that in a poker game
concept's extension
of all cards 3♣
King ♦
5♠
♦ Things in a container
− POST Sales Line Item
♦ Abstract noun concepts
− POST Waiting line rage
♦ Events
− POST Sale
1 1
Records 6 Records6
* *
Sale Sale
Product
POST Item Store Sale
Catalog
Sales Product
Cashier Customer Manager
LineItem
Specification
ECE 452 - Introduction to Software Engineering
Defining Terms in the UML
♦ The Software class diagram will look a lot like the
conceptual model
♦ You will see associations, boxes, multiplicity...
♦ Larman uses concept to refer to real world things and
unreal things
♦ Classes refer to software specifications and
implementations. UML defines class as
− a description of a set of a objects that share the same
attributes, relationships, and semantics
the three Amigos: Grady Booch, Ivar Jacobsen, Jim Rumbaugh
♦ Operation
− a service that can be requested from an object to
affect behavior
♦ Type
− either a class or an interface specification with no methods
♦ Interface
− the set of externally visible operations
♦ Could mean a Java interface
Records-current
POST Sale
1 1
ECE 452 - Introduction to Software Engineering
Associations
♦ Associations imply
− our knowledge of the relationship must be
preserved for some time (1 ms to forever)
♦ between what objects do we need to remember a
relationship?
• POST: does a driver's license remember a product catalog?
• Poker: does a game need to remember it's Player(s)?
• Poker: does the winner need to know the card image
collection?
models and
1..40
class diagrams T one to forty
5
T exactly five
Multiplicity
adornments
3, 5, 8 exactly three,
T
five or eight
ECE 452 - Introduction to Software Engineering
Possible Associations
♦ A is a physical part of B Drawer - POST
♦ A is a logical part of B SalesLineItem - Sale
♦ A is physically contained in B POST-Store
♦ A is logically contained in B ItemDescription-Catalog
♦ A is recorded in B Sale - POST
♦ A uses or manages B Cashier - POST
♦ A communicates with B Customer - Cashier
♦ A is related to a transaction B Customer - Payment
− Draw some poker associations now
♦ Let's try to get one for each of the bullets above
ECE 452 - Introduction to Software Engineering
Associations
Mother Child
1 1+
Car Wheel
1 4
Car Wheel
1 5
Car Wheel
1 3
Store
1
Contains
1..*
♦ POST
− Post Captures Sale
− Sale Paid-By Payment
− ProductCatalog Records Specification
Described-by 1
Product
Product Specification
Catalog Contains
1 1.. *
1
0..1 Used-by
* Describes
Sales * *
LineItem Store
Item
Stocks
1 1 1
*
1.. *
Logs- 1
Contained-in Houses
completed
1 6 1.. *
Sale * POST
Manager
Captured-on Started-by
1 1 1 1
1
1
1 Initiated-by 1
Paid-by 3 Records-sales-on
1 1 1 see pages
Initiated-by
Payment Customer Cashier 116-117
1
Described-by 1
Product
Product Specification
Catalog Contains
1 1.. *
1
0..1 Used-by
* Describes
Sales * *
LineItem Store
Item
Stocks
1 1 1
*
1.. *
Logs- 1
Contained-in Houses
completed
1 6 1.. *
Sale * POST
Captured-on
1 1
1
1
1 Initiated-by 1
Paid-by 3 Records-sales-on
1 1 1 see pages
Initiated-by
Payment Customer Cashier 116-117
1
Described-by 1
Product
Product Specification
Catalog Contains
1 1.. *
1
0..1 Used-by
* Describes
Sales * *
LineItem Store
Item
1 1
1.. *
Logs- 1
Contained-in Houses
completed
1 6 1.. *
Sale * POST
Captured-on
1 1
1
1
1 Initiated-by 1
Paid-by 3 Records-sales-on
1 1 1 see pages
Initiated-by
Payment Customer Cashier 116-117
1
Cashier POST
Better 1 Uses 1
name number