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.

Slides:



Advertisements
Similar presentations
Object Design Examples with GRASP
Advertisements

Use cases.
January Ron McFadyen1 Use Cases in the UML Functionality under consideration is represented by use cases (named ellipses) enclosed in a box.
Jan 16, Ron McFadyen1 Ch 9. Use-case model: drawing System Sequence Diagrams Iteration 1: a simple cash-only success scenario of Process Sale.
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,
6/8/991 Analysis Tuesday 09/14/99 Revised: September 11, 2000 (APM)
Domain model: visualizing concepts
Copyright ©2004 Cezary Z Janikow 1 Use Cases n Within Requirements discipline/workflow n Verbal descriptions of important functional (behavioral, transactional,
NJIT 1 Domain Model Visualizing Concepts Chapter 9 Applying UML and Patterns Craig Larman.
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.
Object-Oriented Development Process Part I: Requirement Gathering Warsun Najib Department of Electrical Engineering Gadjah Mada University.
Chapter 9 Domain Models 1CS6359 Fall 2012 John Cole.
9/18/011 Software Requirements Analysis and Design (Continued)
Domain Modeling Chandan R. Rupakheti and Steve Chenoweth Week 5, Day 1.
How to Make a Domain Model Tutorial
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”
Software Engineering 1 Object-oriented Analysis and Design Chap 30 Relating Use Cases.
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 1 , 2 , 3 and 4 Applying UML and Patterns -Craig Larman
SOEN 6011 Software Engineering Processes Section SS Fall 2007 Dr Greg Butler
DOMAIN MODEL— PART 2: ATTRIBUTES SYS466. Looking For Potential Classes “Know the business”. Ask Questions Identify business concepts; filter nouns (person,
Chapter 9 Domain Models. Domain Modeling After you have your requirements you start modeling the domain. You are still modeling the business, not the.
TK2023 Object-Oriented Software Engineering CHAPTER 5 DOMAIN MODELLING.
Domain Modelling Presented By Dr. Shazzad Hosain.
Sept Ron McFadyen1 Section 10.1 Domain Models Domain Model: a visual representation of conceptual classes or real-world objects in a domain.
SOFTWARE DESIGN AND ARCHITECTURE LECTURE 20. Review Software Requirements Requirements Engineering Process.
Review ♦ System sequence diagram ♦ Domain model
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)
Practical Object-Oriented Design with UML 2e Slide 1/1 ©The McGraw-Hill Companies, 2004 PRACTICAL OBJECT-ORIENTED DESIGN WITH UML 2e Chapter 4: Restaurant.
OOSE Use Case. Requirement Functional: –Features, capabilities, and security Non Functional: –Usability: Human factors, help, and documentation –Reliability:
Conceptual Modeling Modeling the Problem Domain. Conceptual Modeling Decompose problem space into comprehensible concepts. Clarify the terminology or.
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
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.
Elaboration Iteration 1- Part 1
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,
Repetition af Domæne model. Artifact influence emphasizing the Domain Model.
DOMAIN MODEL: ADDING ATTRIBUTES Identify attributes in a domain model. Distinguish between correct and incorrect attributes.
BTS430 Systems Analysis and Design using UML Domain Model—Part 2A: Attributes.
January Ron McFadyen1 Domain Models Domain Model: a visual representation of conceptual classes or real-world objects in a domain of interest.
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.
Understanding Requirements
BTS430 Systems Analysis and Design using UML Domain Model—Part 2: Associations and Attributes.
Larman chapter 101 Domain Model: Visualizing concepts Larman chapter 10.
Dr. Awais Majeed Object Oriented Design and UML.
1 Object Oriented Analysis and Design Conceptual Model.
OO DomainModeling With UML Class Diagrams and CRC Cards Chapter 6 Princess Nourah bint Abdulrahman University College of Computer and Information Sciences.
DOMAIN MODEL—PART 2: ATTRIBUTES BTS430 Systems Analysis and Design using UML.
Requirements capture: Using UML Use Cases David Millard and Yvonne Howard {dem,
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
Domain Model: Visualizing concepts
Conceptual Model.
UML Use Case Diagrams.
OO Domain Modeling With UML Class Diagrams and CRC Cards
OO Domain Modeling With UML Class Diagrams and CRC Cards
Relating Use Cases popo.
Object Oriented Analysis and Design Conceptual Model.
Object Oriented Analysis
Domain Model: Visualizing Concepts
Presentation transcript:

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 sale Place Order Loan book

How to document use cases ? Verbal description oDescribes the content of each use case oTypically uses a pre-defined template Use Case diagrams oGive an overview of visible use scenarios in the system oDescribes what actors that interact with the system oDescribes any linkages between use cases

Defining system´s scope Boundary of the system (1) Actor (2) Use case (3) Linkage between use cases (4)

Who are Actors – stakeholders ?  Three kind of Actors - Stakeholders m Primary actor has user goals fulfilled through using services. (e.g., the cashier). m Supporting actor provides a service (e.g., the automated payment authorization service ). Often a computer system, but could be an organization or person (external interfaces) (e.g. : tax calculation ) m Offstage actor has an interest in the behavior of the use case, but is not primary or supporting (e.g., a government tax agency).

How to find Use Cases ? 6 As a primary actor, what are your goals ? I should be able to ……..

10/5/2015 CPSC , CPSC , Lecture 3 7 Use case example – Restaurant case UC1 : Record Booking  Receptionist enters date of requested reservation;  System displays bookings for that date;  There is a suitable table available: Receptionist enters details (customer’s name, phone number, time of booking, number of covers, table number);  System records and displays new booking.

Use case diagram- POS system Actor (person) use case Actor (system)

10/5/ Use case rearrangement: Restaurant case System

Adding a Use Case Extension Customer Rent Automobile Book Trip Agent «extend» Customer requests a rental auto

Cancel Trip Use Case Diagram Customer Cancel Trip Agent Cancel HotelCancel Flight «include»

Domain Model Chapter 9 Applying UML and Patterns -Craig Larman

Introduction Reminder: Use cases are not object-oriented requirement analysis, but they emphasize an activity view ( illustrate user activities on the system) A domain model is the most important and classic-model in Object Oriented Analysis 13

Your attention please 14

What is a Domain Model? Problem domain : area ( scope )of application that needed to be investigated to solve the problem Domain Model : Illustrates meaningful conceptual objects in problem domain. So domain model are conceptual objects of the area of application to be inestigated

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. Not of software objects Is part of business Model artifact (document)

Domain Model may contain :  Domain objects (conceptual classes)  Attributes of domain objects  Associations between domain objects  Multiplicity 17 Domain model representation?

18 Domain Model - UML Notation Illustrated using a set of domain objects (conceptual classes) with no operations ( no responsibility assigned yet, this will be assigned during design).

A Domain Model is not a Software document Sale Date Time Print() Object responsibilities is not part of the domain model. ( But to consider during Design )

Symbol, intension and extension. Fig 9.5 All the examples of sales called instances

Question : Why create Domain model ? Answer : Get inspiration to create software classes We assign responsibilities during design

How to find these conceptual classes and attributes ?

23 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.

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. 24

8. System logs completed sale and sends sale and payment information to the external accounting system (for accounting and commissions) and Inventory system (to update inventory). 9. System presents receipt. 10. Customer leaves with receipt and goods (if any). Extensions (or alternative Flows) 7a. Paying by cash: 1. Cashier enters the cash amount tendered. 2. System presents the balance due, and releases the cash drawer. 3. Cashier deposits cash tendered and returns balance in cash to Customer. 4. System records the cash payment. 25

Fig. 9.7 Important : There is no such things as a correct list. Brainstorm what you consider noteworthy to be a candidate. But in general, different modelers will find similar lists.

Identification of conceptual classes 27 Identify candidate conceptual classes Go through them and :  Exclude irrelevant features and duplications  Do not add things that are outside the scope ( outside the application area of investigation)

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

Suppose all the items (ObjectBurgers) are sold out and then deleted. Someone ask you : How much do ObjectBurgers cost ? When to model Specification/Description Conceptual Classes?

How to model Specification/Description ProductDescription is a class that records information about an item It avoids duplication of recording the descriptive information with each instance of the item.

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 31

Fig. 9.19

Fig. 9.20

34 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 ?

Represent waht may be considered as primitive data type as a non primitive class if : It is composed of separate sections  Phone number,name of person There are operations usually associated with it, such as validation  Social security number It has other attributes  Promotional price could have a strat date and end date It has a quantity with a unit  Payment of an amount with currency 35

Should the “ItemID” class be shown as a separate class ? It depends on how the domain model is being used. Fig ItemID are primitive types(number, boolean, character, string…etc) ItemID is a new type with its own attributes

Case study : Restaurant part (1) 37

How to find these associations and multiplicities?

Fig 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 40

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 41

Common association list A is recorded i n B SaleI-Register A is an organization subunit of B. Departement - Store A communicate with B Customer - Cashier 42

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 43

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

Association or attribute ?  Most attribute type should be “primitive” data type, such as: numbers, string or boolean (true or false)  Attribute should not be a complex domain concept(Sale, Airport)  CurrentRegister is of type “Register”, so expressed with an association  Most attribute type should be “primitive” data type, such as: numbers, string or boolean (true or false)  Attribute should not be a complex domain concept(Sale, Airport)  CurrentRegister is of type “Register”, so expressed with an association

A destination airport is not a string, it is a complex thing that occupies many square kilometers of space. So “Airport” should be related to “Flight” via an association, not with attribute Association or attribute ?

“many” ( 0 or more ) 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 Multiplicity

“many” ( 0 or more ) Ask these 2 questions : 1 store may stock how many item ? 1 item may be stocked in how many stores ? How to determine multiplicity ?

Person Company works for Association Name 0..* 1 How to determine multiplicity ?

Multiplicity

How to create a domain model Identify candidate conceptual classes Go through them Exclude irrelevant features and duplications Do not add things that are outside the scope Draw them as classes in a UML class diagram Add associations necessary to record the relationship that must be retained Add attributes necessary for information to be preserved

But remember There is no such thing as a single correct domain model. All models are approximations of the domain we are attempting to understand. We incrementally evolve a domain model over several iterations on attempts to capture all possible conceptual classes and relationsships.

Case study : Restaurant part (2) 53