Review ♦ System sequence diagram ♦ Domain model

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 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
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,
1 Domain Model Adding Associations Chapter 11 Applying UML and Patterns -Craig Larman.
NJIT Use Case Model Operation Contracts Prepared By: Sumit Sharma.
6/8/991 Analysis Tuesday 09/14/99 Revised: September 11, 2000 (APM)
Domain model: visualizing concepts
NJIT 1 Domain Model Visualizing Concepts Chapter 9 Applying UML and Patterns Craig Larman.
Object-Oriented Analysis and Design
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.
חוזים – 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)
Domain Modeling Chandan R. Rupakheti and Steve Chenoweth Week 5, Day 1.
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.
Chapter 9 Domain Models. Domain Model in UML Class Diagram Notation A “visual dictionary”
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’
SOEN 6011 Software Engineering Processes Section SS Fall 2007 Dr Greg Butler
Last lecture. What is a Use Case Use cases are stories (scenarios) of how actors use (interact with) the system to fulfill his goal. Examples Process.
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.
Lecture 9 Enterprise Systems Development ( CSC447 ) COMSATS Islamabad Muhammad Usman, Assistant Professor.
Jan 21, Ron McFadyen1 Ch 10. Domain Model: Visualizing Concepts Domain model illustrated with a class diagram (with no operations defined)
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.
Lecture 13-17, chitkara university.  Gives a conceptual framework of the things in the problem space  Helps you think – focus on semantics  Provides.
Chapter 9 Applying UML and Patterns -Craig Larman
♦ Use Case Model  Detailled use case - Important  Use case diagram- Refactoring Use case diagram  > 1 Last Lectures.
SYS466: Analysis and Design Using OO Models Domain Class Diagram.
Chapter 1 Applying UML and Patterns. The Need for Software Blueprints Knowing an object-oriented language and having access to a library is necessary.
Larman ch. 131 Use-Case Model : Adding Detail with operation contracts Larman ch. 13.
Drawing System Sequence Diagrams
Elaboration Iteration 1- Part 1
Car rental system.
BTS430 Systems Analysis and Design using UML Domain Model—Part 2: Associations and Attributes.
Domain Model—Part 2: Attributes.  A logical data value of an object  (Text, p. 158)  In a domain model, attributes and their data types should be simple,
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.
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.
Domain Model A representation of real-world conceptual classes in a problem domain. The core of object-oriented analysis They are NOT software objects.
BTS430 Systems Analysis and Design using UML Domain Model—Part 2: Associations and Attributes.
Larman chapter 101 Domain Model: Visualizing concepts Larman chapter 10.
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.
OO DomainModeling With UML Class Diagrams and CRC Cards Chapter 6 Princess Nourah bint Abdulrahman University College of Computer and Information Sciences.
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.
DOMAIN MODEL—PART 2: ATTRIBUTES BTS430 Systems Analysis and Design using UML.
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,
Elaboration popo.
Chapter 9 Domain Models.
System Sequence Diagrams and Operation Contracts
OO Domain Modeling With UML Class Diagrams and CRC Cards
OO Domain Modeling With UML Class Diagrams and CRC Cards
Object Oriented Analysis and Design Conceptual Model.
Operation Contracts Ch. 11.
Domain Model: Visualizing Concepts
Presentation transcript:

Review ♦ System sequence diagram ♦ Domain model Conceptual classes & attributes Association & multiplicity ♦ System sequence diagram

Applying UML and Patterns -Craig Larman Domain model Applying UML and Patterns -Craig Larman

Domain model representation? A domain model is a visual representation of real world concepts (real-situation objects ), that could be : idea, thing , event or object…..etc . Business objects - represent things that are manipulated in the business e.g. Order. Real world objects – things that the business keeps track of e.g. Contact , book. Events that transpire - e.g. sale, loan and payment.

Method1: Noun Phrase Identification Identify Nouns and Noun Phrases in textual descriptions of the domain that could be : The fully dressed Use Cases The problem definition. But not strictly a mechanical process. Why ? Words may be ambiguous ( such as : System ) Different phrases may represent the same concepts.

Method2 : By Category List (read p 140-141) Common Candidates for classes include: Descriptions , Roles , Places , Transactions Containers , Systems , abstract nouns , Rules Organizations, Events, Processes, catalogs , Records , services.

Attributes A logical data value of an object. Imply a need to remember information. Sale needs a dateTime attributte Store needs a name and address Cashier needs an ID Use case scenarios are examined to discover also attributes

A Common Mistake when modeling the domain- Classes or Attributes? Rule If we do not think of a thing as a number or text in the real world, then it is probably a conceptual class. If it takes up space, then it is likely a conceptual class. Examples: Is a store an attribute of a Sale ? Is a destination an attribute of a flight ?

Association Relationship between classes (more precisely, between instances of those classes)indicating some meaningful and interesting connection

Common association list A is a physical part of B . Wing - Airplane A is a logical part of B SalesLineItem - Sale A physical contained in B Register-Sale

Common association list A is a logical contained in B ItemDescription - Catalog A is a description of B . ItemDescription - Item A is a member of B Cashier – Store A uses or manage B Cashier-Register

Common association list A is recorded in B Sale-Register A is an organization subunit of B . Departement - Store A communicate with B Customer - Cashier

Common association list A is related to a transaction B Customer - Payment A is a transaction related to another transaction B . Payment - Sale A is owned by B Register - Store A is an event related to B Sale- Customer

High priority association A is a physical or logical part of B A is physically or logically contained in/on B A is recorded/known/reported / captured in B NB: Avoid showing redundant or derivable associations Do not overwhelm the domain model with associations not strongly required

Examples Sale is recorded in a register SalesLineItem is a logical part of Sale

“many” ( 0 or more ) Multiplicity Multiplicity indicates how many instances can be validly associated with another instance, at a particular moment, rather than over a span of time. Example : monogamy

System Sequence diagram Applying UML and Patterns -Craig Larman

Relationship SSD and Use case Develop SSDs for the main success scenario of a selected use case, then frequent alternative scenarios

Process Sale

Example

Car rental system

Car rental system

Use case : rent a car The use case begins when the customer selects ”Book Now”. The system displays the available cars The customer selecst the type of car in the checkbox that contains: Sport cars Station wagon Normal The system displays the list of available cars

Use case : rent a car The customer enters the pick-up/ drop-off date and place. The system displays cars availbale with the fair The customer selects the requested car. The system display a confirmation screen that contains: The car rented Pick up/ drop off date and place Amount the customer has to pay The user confirms the criteria and the use case ends.

Chap 11 Operation Contracts Chapter 11 Applying UML and Patterns -Craig Larman

Operation Contract Operation contract identifies system state changes when an operation happens. Define what each system operation does An operation is a single event from the system sequence diagram A domain model is used to help generate an operation contract

Operation Contract When making an operation contract, think of the state of the system before the action and the state of the system after the action. The conditions both before and after the action should be described in the operation contract. The pre and post conditions describe state, not actions.

Sections of an Operation Contract Operation: Name of the operation and parameters Cross References: Use cases and scenarios this operation can occur within Preconditions: Noteworthy assumptions about the state of the system or objects in the Domain Model before execution of the operation. Postconditions: This is the most important section. The state of objects in the Domain Model after completion of the operation

Postconditions: most important Describe changes in the state of objects in the domain model after completion of the operation what instances were created ? what associations were formed/broken? what attributes changed? Are not actions to be performed during the operation

Examples of Operation Contracts From Process Sale Use Case

2. Cashier starts a new sale. 3. Cashier enters item identifier. Main Success Scenario (or Basic Flow): 1. Customer arrives at POS checkout with goods and/or services to purchase. 2. Cashier starts a new sale. 3. Cashier enters item identifier. 4. System records sale line item and presents item description, price, and running total. Price calculated from a set of price rules. Cashier repeats steps 3-4 until indicates done. 5. System presents total with taxes calculated. 6. Cashier tells Customer the total, and asks for payment. 7. Customer pays and System handles payment.

POS Domain Model

Operation Contract for makeNewSale operation Operation: makeNewSale() Cross References: Use Case: Process Sale Scenario: Process Sale Preconditions: none Postconditions a sale instance “s” was created (instance creation) s was associated with the Register (association formed) attributes of s were initialized

s:Sale was created association was created attributes of s:Sale were initialized

Operation Contract for enterItem operation Operation: enterItem(itemID,quantity) Cross References: Use Case: Process Sale Scenario: Process Sale Preconditions: There is a sale underway.

Operation Contract for enterItem operation Postconditions: A salesLineItem 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 ProductDescription, based on itemId match (association formed)

associations were created sli:SalesLineItem was created sli.quantity was initialized to input quantity

Operation Contract for endSale operation Operation: endSale() Cross References: Use Case: Process Sale Scenario: Process Sale Preconditions: There is a sale underway Postconditions s.isComplete became true (attribute modification)

s.isComplete became true

Operation Contract for makePayment operation Operation: makePayment(amount:Money) Cross References: Use Case: Process Sale Scenario: Process Sale Preconditions: There is a sale underway

Example—Operation Contract for makePayment operation Postconditions a payment instance “p” was created (instance creation) p.amountTendered became amount (attribute modification) p was associated with s:Sale (association former) s:Sale was associated with the Store (association formed)

What this looks like: associations were created p:Payment was created p.amountTendered was initialized to input amount

Why Operation Contracts? An excellent tool of OO requirements analysis that describes in great detail the changes required by a system operation (in terms of the domain model objects) without having to describe how they are to be achieved Excellent preparation for opening the System black box!

Questions Please ?