System Sequence Diagrams and Operation Contracts

Slides:



Advertisements
Similar presentations
Object Design Examples with GRASP
Advertisements

Jan 15, Ron McFadyen1 Ch 9. Use-case model: drawing System Sequence Diagrams Iteration: a simple cash-only success scenario of Process Sale.
Jan 23, Ron McFadyen1 SSD for a samplePOS Use Case Figure 13.1 Input Events invoke a system operation of the same name same idea as in object-oriented.
January Ron McFadyen1 Use Cases in the UML Functionality under consideration is represented by use cases (named ellipses) enclosed in a box.
Sequence Diagram Objects are represented horizontally across the top of the diagram Each object has a lifeline some exist before and/or after some are.
Jan 16, Ron McFadyen1 Ch 9. Use-case model: drawing System Sequence Diagrams Iteration 1: a simple cash-only success scenario of Process Sale.
Jan Ron McFadyen1 Consider a simple cash-only Process Sale scenario 1. Customer arrives at a POS checkout with goods and/or services to purchase.
Object-Oriented Analysis and Design
Systems Analysis and Design in a Changing World, Fourth Edition
January Ron McFadyen1 Ch 9. Use-case model: drawing System Sequence Diagrams Elaboration Iteration 1: a simple cash-only success scenario of.
Sept Ron McFadyen1 Use Cases Introduced by Ivar Jacobson in 1986 literal translation from Swedish ”usage case” - may be of.
Fall 2009ACS-3913 Ron McFadyen1 Use Cases Used to capture functional requirements – there are other requirements categories such as usability, reliability,
Chapter 10 System Sequence Diagrams. What is a System Sequence Diagram? A way of modeling input and output events related to systems It is a picture that.
NJIT Use Case Model Operation Contracts Prepared By: Sumit Sharma.
6/8/991 Analysis Tuesday 09/14/99 Revised: September 11, 2000 (APM)
ACS-3913Fall 2009 Ron McFadyen1 Contracts Used to help understand requirements more completely (and so may not always be necessary) based on assertions;
Object-Oriented Analysis and Design
Use Case Modeling. Kendall & Kendall© 2005 Pearson Prentice Hall18-2 Commonly Used UML Diagrams The most commonly used UML diagrams are: – Use case diagram,
Marcelo Santos – OOAD-CDT309, Spring 2008, IDE-MdH 1 Object-Oriented Analysis and Design - CDT309 Period 4, Spring 2008 More on use cases System sequence.
Sept Ron McFadyen1 Extend Relationship.
Use Case Model Operation Contracts Prepared By: Sumit Sharma and Sravanthi Gillala.
חוזים – Contracts 1. Larman – Chapter 10 – SSDs 10.2 What are System Sequence Diagrams? (introduction) Use cases describe how external actors interact.
9/18/011 Software Requirements Analysis and Design (Continued)
TK2023 Object-Oriented Software Engineering CHAPTER 6 SYSTEM SEQUENCE DIAGRAMS.
Applying UML and Patterns An Introduction to Object-oriented Analysis and Design and Iterative Development Part III Elaboration Iteration I – Basic1.
CSSE 374: Operations Contracts and Logical Architectures Steve Chenoweth Office: Moench Room F220 Phone: (812)
SOEN 6011 Software Engineering Processes Section SS Fall 2007 Dr Greg Butler
Object Oriented Analysis and Design System Events & Contracts.
SOEN 343 Software Design Section H Fall 2006 Dr Greg Butler
Object Design Examples with GRASP (Ch. 18)
Sept Ron McFadyen1 Section 10.1 Domain Models Domain Model: a visual representation of conceptual classes or real-world objects in a domain.
Use Case Model Operation Contracts Chapter 11 Applying UML and Patterns Craig Larman.
USE CASE Bayu Adhi Tama, MTI Faculty of Computer Science, University of Sriwijaya Slides are adapted from Petrus Mursanto
Review ♦ System sequence diagram ♦ Domain model
Group 2 work What is sequence diagram ? What is sequence diagram ? Why do we use it ? Why do we use it ? What is basic notation of SD? What is basic notation.
OOSE Use Case. Requirement Functional: –Features, capabilities, and security Non Functional: –Usability: Human factors, help, and documentation –Reliability:
1 Lecture 6: Operation Contracts. 2 Overview  What is contract ?  The guidelines for writing contracts for the system operations.  Use Case realizations.
Operation Contracts: Getting ready to open the “System” black box All material from Applying UML and Patterns, 3 rd Edition, Craig Larman, chapter 11.
Chapter 9 Applying UML and Patterns -Craig Larman
Discovering object interaction. Use case realisation The USE CASE diagram presents an outside view of the system. The functionality of the use case is.
Larman ch. 131 Use-Case Model : Adding Detail with operation contracts Larman ch. 13.
COMP-350 Object-Oriented Analysis and Design Drawing System Sequence Diagrams Reference: Larman, Chapter 9.
Chapter 11 Operation Contracts. What They Are An operation is a specification of a transformation or query that an object may be called on to execute.
Week 4 Operational Contracts Requirements to Design Logical Architecture.
System Sequence Diagram Chandan Rupakheti & Steve Chenoweth Week 5-3a.
Phase 6 Start: Saturday14 April End: Saturday 21 April
Sept Ron McFadyen1 Use Cases Introduced by Ivar Jacobson in 1986 literal translation from Swedish ”usage case” Used to capture and describe.
PRESENTATION ON USE CASE. Use Case Modeling Use case diagrams describe what a system does from the standpoint of an external observer. The emphasis is.
Domain Model A representation of real-world conceptual classes in a problem domain. The core of object-oriented analysis They are NOT software objects.
OO Methodology Elaboration Phase Iteration 1- Part 3.
Summary from previous lectures
1 Chapter 9: Operation Contracts Chapter 13 in Applying UML and Patterns Book.
Use-Case Model: Adding Detail with Operation Contracts.
1 Design Model Use-Case realizations with GRASP Larman chapter 17.
SYSTEM-LEVEL SEQUENCE DIAGRAMS Sys466. System-Level Sequence Diagrams  Use cases describe how external actors interact with the software system…  An.
Requirements capture: Using UML Use Cases David Millard and Yvonne Howard {dem,
1 Object Oriented Analysis and Design System Events & Contracts.
Jan Ron McFadyen1 Use Cases Used to capture functional requirements – there are other requirements categories such as usability, reliability,
OO Methodology Elaboration Phase Iteration 1- Part 2.
Object Design Examples with GRASP
Elaboration popo.
System sequence diagrams
Webapp Design with System Sequence Diagrams
UML Use Case Diagrams.
DESIGN MODEL: USE-CASE REALIZATIONS WITH GRASP PATTERNS
OO Domain Modeling With UML Class Diagrams and CRC Cards
Relating Use Cases popo.
Object Oriented Analysis
Operation Contracts Ch. 11.
Use cases Dr. X.
Presentation transcript:

System Sequence Diagrams and Operation Contracts http://flic.kr/p/55R24j

What are you going to learn about today? System sequence diagrams (SSDs) What? How? Why? Operation contracts http://flic.kr/p/8JpkTg

Recall: Iterative development process We are here http://en.wikipedia.org/wiki/File:Iterative_development_model_V2.jpg

Recall: Analysis bridges the gap between requirements and design http://flic.kr/p/a1NZHb Analysis Requirements

Last time we learned about one type of OO analysis: Domain Modeling (using class diagrams) Another useful OO analysis activity is creating System Sequence Diagrams (SSDs)

System Sequence Diagrams (SSDs) Model interactions between the system to be build and external actors Capture one scenario of events System is a black box Emphasizes system events Represented using UML sequence diagram notation

Consider the Process Sale UC Main Success Scenario Customer arrives at POS checkout with goods to purchase Cashier starts a new sale Cashier enters item identifier System records sale line item and presents item description, price, and running total Cashier repeats steps 3-4 until indicates done System presents total, and asks for payment Customer pays and System handles payment System logs completed sale System presents receipt SSDs can help you abstract out system events

POS Example: Process Sale SSD External actor System as black box Actor lifelines Time progresses downward

Process Sale UC Main Success Scenario Customer arrives at POS checkout with goods to purchase Cashier starts a new sale Cashier enters item identifier System records sale line item and presents item description, price, and running total Cashier repeats steps 3-4 until indicates done System presents total, and asks for payment Customer pays and System handles payment System logs completed sale System presents receipt

POS Example: Process Sale SSD Message event

Process Sale UC Main Success Scenario Customer arrives at POS checkout with goods to purchase Cashier starts a new sale Cashier enters item identifier System records sale line item and presents item description, price, and running total Cashier repeats steps 3-4 until indicates done System presents total, and asks for payment Customer pays and System handles payment System logs completed sale System presents receipt

POS Example: Process Sale SSD Looping event Loop guard “Return” values from previous message

Process Sale UC Main Success Scenario Customer arrives at POS checkout with goods to purchase Cashier starts a new sale Cashier enters item identifier System records sale line item and presents item description, price, and running total Cashier repeats steps 3-4 until indicates done System presents total, and asks for payment Customer pays and System handles payment System logs completed sale System presents receipt

POS Example: Process Sale SSD

Process Sale UC Main Success Scenario Customer arrives at POS checkout with goods to purchase Cashier starts a new sale Cashier enters item identifier System records sale line item and presents item description, price, and running total Cashier repeats steps 3-4 until indicates done System presents total, and asks for payment Customer pays and System handles payment System logs completed sale System presents receipt

POS Example: Process Sale SSD

Prelude to an activity: Recall the bicycle sharing system http://en.wikipedia.org/wiki/File:Barclayscyclehire.jpg

Prelude to an activity: Recall the bicycle sharing system Bicycle stations The System Mobile/web customer Phone customer Phone system Service tech Phone support

Activity: Creating an SSD for UC Checkout Bicycle http://flic.kr/p/5dfuqL Activity: Creating an SSD for UC Checkout Bicycle Main success scenario Mobile/Web Customer provides identification System authenticates Mobile/Web Customer System presents Mobile/Web Customer’s available credits Mobile/Web Customer sends checkout request with Station’s ID System identifies ID of bicycle in Station to checkout System instructs Station to release bicycle with that ID Station unlocks bicycle Station sends confirmation to System that bicycle was unlocked System debits Mobile/Web Customers account and records checkout System tells Mobile/Web Customer which bicycle to collect and presents updated credit information

Why are SSDs useful? Help you come up with a minimal set of system operations your system must support Help you identify operations that in multiple UCs Suggest object collaborations for your subsequent software design Larman even recommends creating an SSD for each main success scenario of your UCs

System events discovered with the SSDs reveal System operations that handle the events all of which form The system interface

Operation contracts document the system interface Each operation contract consists of: Operation – Name of op Cross references – List of UCs that the op occurs in Preconditions – Noteworthy assumptions about the state of the System or objects in the Domain Model before the operation executes Postconditions – State of the System or objects in the Domain Model after the operation completes

POS Example: enterItem Contract Operation: enterltem(itemlD : ItemID, quantity : integer) Cross references: UC Process Sale Preconditions: There is a sale underway. Postconditions: A SalesLineltem instance sli was created (instance creation). sli was associated with the current Sale (association formed). sli.quantity became quantity (attribute modification). sli was associated with a ProductSpecification, based on itemID match (association formed). Note the changes to the Domain Model. Such changes may be: Instance creation or deletion Attribute change of value Associations formed or broken

Activity: Creating an operation contract http://flic.kr/p/5dfuqL Activity: Creating an operation contract Write a contract for each system operation revealed by your SSD from the previous activity

Summary System sequence diagrams: Good for identifying http://flic.kr/p/YSY3X Summary System sequence diagrams: Good for identifying system operations and potential object collaborations Operation contracts document the system interface