Larman ch. 131 Use-Case Model : Adding Detail with operation contracts Larman ch. 13.

Slides:



Advertisements
Similar presentations
Object Design Examples with GRASP
Advertisements

Feb 2003 R McFadyen1 Contracts (Ch 13) Used to help understand requirements more completely based on assertions; assertions are applicable to any.
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.
March Ron McFadyen1 Ch 17: Use Case Realizations with GRASP Patterns Assigning responsibilities to objects to achieve user goals Section 17.4.
Oct Ron McFadyen1 Ch 17: Use Case Realizations with GRASP Patterns P. 248: “The assignment of responsibilities and design of collaborations.
Object-Oriented Analysis and Design
Jan 2005 Ron McFadyen1 Contracts Used to help understand requirements more completely (and so may not always be necessary) based on assertions;
NJIT Object Design Examples with GRASP Chapter 18 Applying UML and Patterns Craig Larman Presented By : Ajay Alegonda.
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;
© 2005 Prentice Hall5-1 Stumpf and Teague Object-Oriented Systems Analysis and Design with UML.
September 2002 R McFadyen1 Domain Model Use Case Model text diagram SSD System operation contracts Design Model Figure 13.3.
Object-Oriented Analysis and Design
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)
Applying UML and Patterns An Introduction to Object-oriented Analysis and Design and Iterative Development Part III Elaboration Iteration I – Basic1.
CSSE 374: More GRASP’ing and Use Case Realization Steve Chenoweth Office: Moench Room F220 Phone: (812) These.
INFO 620Lecture #51 Information Systems Analysis and Design Sequence and Collaboration Diagrams INFO 620 Glenn Booker.
CSSE 374: Operations Contracts and Logical Architectures Steve Chenoweth Office: Moench Room F220 Phone: (812)
What is a domain model? “A domain model captures the most important types of objects in the context of the business. The domain model represents the ‘things’
Chapter 18 Object Design Examples with GRASP. Objectives Design use case realizations –A use-case realization describes how a particular use case is realized.
SOEN 6011 Software Engineering Processes Section SS Fall 2007 Dr Greg Butler
Object-Oriented Analysis and Design Feb 4, 2009.
1 Ch 18. Object Design Examples With Grasp Objectives Design use case realizations. Apply GRASP to assign responsibilities to classes. Apply UML to illustrate.
Object Oriented Analysis and Design System Events & Contracts.
SOEN 343 Software Design Section H Fall 2006 Dr Greg Butler
Chapter 6 Use Cases. Use Cases: –Text stories Some “actor” using system to achieve a goal –Used to discover and record requirements –Serve as input to.
GRASP: Designing Objects With Responsibilities Chapter 17 Applying UML and Patterns -Craig Larman.
Object Design Examples with GRASP (Ch. 18)
Use Case Model Operation Contracts Chapter 11 Applying UML and Patterns Craig Larman.
Review ♦ System sequence diagram ♦ Domain model
Object-Oriented Analysis and Design 1 Mira Balaban & Arnon Sturm Object-Oriented Analysis and Design Session 4: Object-Oriented Software Construction.
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.
NJIT UML Class Diagrams Chapter 16 Applying UML and Patterns Craig Larman.
Chapter 1 Applying UML and Patterns. The Need for Software Blueprints Knowing an object-oriented language and having access to a library is necessary.
Drawing System Sequence Diagrams
COMP-350 Object-Oriented Analysis and Design Drawing System Sequence Diagrams Reference: Larman, Chapter 9.
Use Case Driven Analysis Requirements Use Case Use Case Description System Sequence Diagram Chapter 5.
System sequence diagrams
Chapter 10 Drawing System Sequence Diagrams
DOMAIN MODEL: ADDING ATTRIBUTES Identify attributes in a domain model. Distinguish between correct and incorrect attributes.
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.
COMP 6471 Software Design Methodologies Winter 2006 Dr Greg Butler
Operation Contracts. Primary way to describe system behavior is with use cases Operation contracts provide more details in terms of state changes to objects.
Week 4 Operational Contracts Requirements to Design Logical Architecture.
Fall 2009ACS-3913 Ron McFadyen1 Use Case Realizations with GRASP Patterns “The assignment of responsibilities and design of collaborations are very important.
TK2023 Object-Oriented Software Engineering CHAPTER 12 Introduction to Responsibility-Driven Design.
Phase 6 Start: Saturday14 April End: Saturday 21 April
Domain Model A representation of real-world conceptual classes in a problem domain. The core of object-oriented analysis They are NOT software objects.
Larman chapter 101 Domain Model: Visualizing concepts Larman chapter 10.
GRASP: Designing Objects With Responsibilities
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.
Software Engineering 1 Object-oriented Analysis and Design Chap 31 More SSDs and Contracts.
Use-Case Model: Adding Detail with Operation Contracts.
1 Design Model Use-Case realizations with GRASP Larman chapter 17.
1 Object Oriented Analysis and Design System Events & Contracts.
OO Methodology Elaboration Phase Iteration 1- Part 2.
System Sequence Diagrams and Operation Contracts
Used to help understand requirements more completely
System sequence diagrams
DESIGN MODEL: USE-CASE REALIZATIONS WITH GRASP PATTERNS
Chapter 11: Class Diagram
Operation Contracts Ch. 11.
Chapter 11: Class Diagram
Presentation transcript:

Larman ch. 131 Use-Case Model : Adding Detail with operation contracts Larman ch. 13

2 UP artifacts

Larman ch. 133 Operation contracts Part of the use-case model –Analyze technique Use cases are the primary mechanism in UP to describe system behavior Contracts help define system behavior –Adds more details –Contracts may not be needed. Objectives –Define operation contracts with Post conditions –Relate contracts to the Domain Model and the Use- Case Model.

Larman ch. 134 System operations handle system events System events invoke systems Operations. The System event makeNewSale invokes a System operation called makeNewSale

Larman ch. 135 Contracts CO2 : enterItem Operation : –Name of operation and parameters –enterIOtem(itemID: ItemID, quantity : integer) Cross Refernce : –Optional use case this operation can occur within –Use Cases : Process Sale Preconditions : –Assumptions about the state of the system before execution of the operation –There is a sale underway Postconditions : –The state of the objects in the domain model after completion of the operation –A SalesItem instanse 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 ProductsSpecification, based on itemID match (association formed)

Larman ch. 136 Postconditions Describe changes in the state of objects in the domain model that are true when the operation has finished. They are not actions to be performed during the operation Postconditions fall into these categories : –Instance creation and deletion –Attribute modification –Associations (UML links) formed and broken.

Larman ch. 137 WHAT !!! Focus on WHAT must happen in terms of objects in the Domain Model. –What instances can be created ? –What associations can be formed ? –What attribute can be modified ? Don’t describe HOW it is archived.

Larman ch. 138 Contracts leads to…. It is common to discover –new conceptual Classes –Attributes –Associations Don’t be limited to the prior definition of the Domain Model

Larman ch. 139 Guidelines : Contratcs 1.Identifying operations from the SSDs. 2.For system operations that are complex and perhaps subtle in their results, or which are not clear in the use case, constructs a contract. 3.To describe the postconditions, use the following categories : Instance creation and deletion Attribute modification Associations formed and broken

Larman ch Postconditions : past tense Notice that the statements are expressed in the past tense : –A SalesLineItem sli was created (instance operation) –Sli was associated with the current Sale (association formed)

Larman ch NextGen POS example P

Larman ch UML operations UML operation : –An operation is a specification of a transformation or query that an object may be called to execute A method is an implementation of an operation. An UML operation has a : –Signature –Operation specification ( describes the effects produced by executing the operation (that is the postconditions. –Uses Pre- and Postconditions

Larman ch Artifact relationships