Object Oriented Analysis and Design Conceptual Model.

Slides:



Advertisements
Similar presentations
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’
Advertisements

Object Design Examples with GRASP
Jan 16, Ron McFadyen1 Ch 9. Use-case model: drawing System Sequence Diagrams Iteration 1: a simple cash-only success scenario of Process Sale.
Solving the Problem Analysis & Design.
1 Domain Model Adding Associations Chapter 11 Applying UML and Patterns -Craig Larman.
1 Domain Model: Adding Attributes Chapter 12 Adding Attributes.
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.
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
Chapter 9 Domain Models. Domain Model in UML Class Diagram Notation A “visual dictionary”
Object-Oriented Analysis and Design
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’
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.
DOMAIN MODEL— PART 2: ATTRIBUTES SYS466. Looking For Potential Classes “Know the business”. Ask Questions Identify business concepts; filter nouns (person,
Object Oriented Analysis and Design System Events & Contracts.
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.
DOMAIN MODE: ASSOCIATIONS, MULTIPLICITY AND ATTRIBUTE-TEXT NOTATION SYS466.
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)
Conceptual Modeling Modeling the Problem Domain. Conceptual Modeling Decompose problem space into comprehensible concepts. Clarify the terminology or.
DOMAIN MODEL- VISUALIZING CONCEPTS Identify conceptual classes related to the current iteration requirements. Create an initial domain model. Distinguish.
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
Domain Model—Part 3: Associations, Multiplicity and Attribute- Text Notation.
SYS466: Analysis and Design Using OO Models Domain Class Diagram.
Conceptual Model or Domain Models Chapter10 Applying UML and pattern.
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.
1 START AT 31 MARCH END 8 APRIL PHASE5(CONCEPTUAL AND SEQUENCE MODEL)
BTS430 Systems Analysis and Design using UML Domain Model—Part 2: Associations and 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.
Chapter 9: Domain Models.  The problem domain is modelled using a UML domain model: This is the first OO model that we will see (Use Cases are very useful.
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.
1 Chapter 9: Operation Contracts Chapter 13 in Applying UML and Patterns Book.
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.
1 Chapter 9: Conceptual Model Chapter 10, 11 & 12 in Applying UML and Patterns Book.
DOMAIN MODEL—PART 2: ATTRIBUTES BTS430 Systems Analysis and Design using UML.
1 Object Oriented Analysis and Design System Events & Contracts.
Laurea Triennale in Informatica – Corso di Ingegneria del Software I – A.A. 2006/2007 Andrea Polini XIV. From Requirements to Design in the UP.
Elaboration popo.
Chapter 9 Domain Models.
Domain Model: Visualizing concepts
Conceptual Model.
Chapter 5: Object Oriented Analysis and Design
Domain Models Part 1
DESIGN MODEL: USE-CASE REALIZATIONS WITH GRASP PATTERNS
OO Domain Modeling With UML Class Diagrams and CRC Cards
OO Domain Modeling With UML Class Diagrams and CRC Cards
Group Members Muhammad Zeeshan ( 16) Adnan Akhtar (4)
CONTENTS Object-Oriented Modeling Using UML
Domain Modeling.
Object Oriented Analysis
Domain Model: Visualizing Concepts
Design Model: Creating Design Class Diagrams
Presentation transcript:

Object Oriented Analysis and Design Conceptual Model

Object Oriented Analysis and Design Software Requirements Specification What are the business needs ? (long text) Collaboration / sequence Diagrams How software objects interact to fulfill task ? (visual) Use Cases What are the domain process ? (text + visual notation) Conceptual Model What are the concepts, terms ? (visual) Sequence Diagrams What are the system events, operations ? (visual) Contracts What do the system operations do ? (text) Design Class Diagrams What is the specification for the software classes ? (visual)

Conceptual Model It is a representation of real-world things, not of software components It may show Concepts Association between concepts Attributes of concepts

Object Oriented vs. Function Oriented Analysis Reminder Library Info System O-O A&D Decompose by objects and concepts Structured A&D Decompose by functions and processes System Catalog Librarian Book Library Record Loans Add Resource Report Fines

Conceptual Model Concepts What are the concepts in the Point of Sale system ?

Conceptual Model Concepts Informally, an idea, thing or object Examples: Register Item Store Sale SalesLineItem Cashier Customer Manager Payment ProductCatalog ProductSpecificatin

Identifying Concepts Two strategies: Concept Category List Noun Phrase List

Identifying Concepts Concept Category List Create a conceptual model by making candidate concepts from a list Contains many common categories that worth considering (not in any particular order)

Identifying Concepts Concept Category List Examples Concept Category Physical objects Places Transactions Transaction line items Roles of people Containers of other things Things in a container Other computer or electro-mechanical systems external to our system Specifications, designs, or description of things POST Store Sale, Payment SalesLineItems Cashier Store, Bin Item CreditCardAuthorizationSystem ProductSpecification

Identifying Concepts Concept Category List Examples Concept Category Organizations Events Processes (often not represented as a concept, but may be) Rules and policies Catalogs Records of finances, work, contracts, legal matters Financial services and instruments Manuals, books SalesDepartment Sale SellingAProduct RefundPolicy ProductCatalog Receipt, Ledger, EmploymentContract LineOfCredit EmployeeManual

Identifying Concepts Noun Phrase Identification Identify nouns and noun phrases in textual description of a problem and consider them as candidate concepts or attributes Expanded use cases are excellent description to draw concepts Warning: a mechanical noun-to-concept mapping isn’t usually possible and words in natural language are ambiguous

Identifying Concepts Noun Phrase Identification Actor Actions: This use case begins when a Customer arrives at a POST checkout system with items to purchase System Response: 3. Determines item price and adds item info to the running sales transaction Description and price of the current item is presented System Response: 3. Determines item price and adds item info to the running sales transaction Description and price of the current item is presented 2. Cashier records the identifier (UPC) for each item. If there is more than one of the same item, Cashier enters the quantity 2. Cashier records the identifier (UPC) for each item. If there is more than one of the same item, Cashier enters the quantity

Identifying Concepts It is better to over-specify a conceptual model with lots of fine-grained concepts, than to under-specify it It is common to miss concepts during initial phase and discover them later (e.g., during design) Do not exclude a concept simply because requirements do not indicate any obvious need for it It is perfectly acceptable to have purely behavioral or attributeless concepts Craig Larman

Identifying Concepts Receipt is a record of a sale and relatively important concept in domain of sales In general, showing a report in a conceptual model is not useful since all its info is derived from other sources However, it has a special role in terms of business rules; customer uses it to return a previously bought item So, what to do?

Writing Concepts a graphical representation In UML, conceptual model is illustrated via a set of static structure diagrams in which no operations are described Concept Attribute1 Attribute2 …. Concept

Writing Concepts a graphical representation What are the concepts in the Point of Sale system ? POST Item Store Sale SalesLineItem Cashier Customer Manager Payment ProductCatalog ProductSpecificatin

How to make a conceptual model List candidate concepts using Concept Category List and noun phrase identification related to current requirements under consideration Draw them in a conceptual model Add associations necessary to record meaningful and interesting relationships between concepts Add attributes necessary to fulfill information requirements

Conceptual Model Associations Definition: An association is a relationship between concepts that indicates some meaningful and interesting connection association name Records-current Post Sale

Associations Associations to Consider Knowledge of the relationship needs to be preserved for some duration Need-to-know associations Sale – SaleLineItem ? Sale – Manager ? Associations derived from a Common Associations List

Associations to Consider Common Associations List A is physical part of B Drawer - POST A is a logical part of B SalesLineItem – Sale A is physically contained in/on B POST – Store, Item – Shelf A is logically contained in B ItemDescription – Item A is a line item of a transaction or report B A is known/ logged/ recorded/ reported/ captured in B Sale – POST A is a member of B Cashier – Store *High priority associations

Associations to Consider Common Associations List A uses or manages B A communicated with B A is related to a transaction B A is transaction related to another transaction B A is next to B A is owned by B A is an organizational subunit of B Cashier – POST Customer – Cashier Customer – Payment Payment – Sale POST – POST POST - Store Department - Store

Associations How to name an association ? Records-current ? Post Sale ? Flies-to Flight City Use TypeName – VerbPhrase - TypeName format VerbPhrase is the name of the association Start an association name with a capital letter

Conceptual Model Associations rules Each end of an association is called a rule. A rule may optionally have: Name Multiplicity expression navigability navigability Flies-to Flight City destination * 1 multiplicity role name

Association rules Multiplicity Defines how many instances of a type A can be associated with one instance of type B Example: One Store stocks many Items Stocks Store Item 1 *

Association rules Multiplicity values

Associations examples

Associations examples Multiple Associations Flight * 1 Flies-to Airport Flies-from Person Drives Car Washes Starts Stops

Association & Concepts Tips: Run through the concepts and associations gathered Keep in mind: It is more important to identify concepts than associations Focus on “need-to-know” associations High priority associations are strongly “need-to-know”

Association & Concepts Tips: Use the vocabulary of domain when naming the concepts Exclude irrelevant features Exclude concepts in the problem domain not relevant to the requirements Do not add things that are not there Exclude things not in the problem domain under consideration

Build a conceptual model for Point of Sale ProductCatalog ProductSpecificatin SalesLineItem Store Item Sale Register Manager Payment Customer Cashier

How to make a conceptual model List candidate concepts using Concept Category List and noun phrase identification related to current requirements under consideration Draw them in a conceptual model Add associations necessary to record meaningful and interesting relationships between concepts Add attributes necessary to fulfill information requirements

Conceptual Model Attributes Definition: An attribute is a logical data value of an object Include attributes when requirements (e.g., use cases) suggests or imply a need to remember information Recall a conceptual model is a representation of real-world things.

Conceptual Model Attributes Sale date startTime:Time Attributes shown in the second section of the concept box. Type info is optional

Conceptual Model Derived attributes Some attributes might be derived from other attributes or from the multiplicity value of the relationship Date Range start: Date end: Date /duration: Days Derived attribute

Conceptual Model Derived attributes

Conceptual Model Attributes Since a cashier is placed in a certain post it might be represented as follows: Is this the best way to represent it ? Cashier name currentPost

Conceptual Model Attributes Keep Attributes Simple Attributes should preferably be simple attributes or pure data values Common attribute types examples: Boolean, Date, Number, String/Text, Time Color, Phone Number, enumerated types

Conceptual Model Attributes What are pure data values ? Their unique identity is not meaningful It does not make sense to distinguish separate instances of them, for example: number 5 string “cat” phone numbers that contain the same number address that contain the same address

Conceptual Model Concept vs. Attribute Do not represent something as an attribute when it should have been a concept Guideline If X cannot be considered as number or text in real world, X is probably a concept, not an attribute When in doubt, make it a separate concept

Concept vs. Attribute Flight Example Worse Better Flies-to Flight destination Flight Airport 1 1 destination is a complex concept Relate concepts with an association, not an attribute

Concept vs. Attribute Cashier-Post Example Worse Better Cashier name currentPost Cashier name Post number Uses 1 1 currentPost is not a simple attribute Relate concepts with an association, not an attribute

Concept vs. Attribute Cashier-Post Example name currentPost Cashier name Post number Uses 1 1 Cashier name currentPostNumber Maybe: Even worse Do not use kind of Foreign Keys in the Real World !!!

Concept vs. Attribute Cashier-Post Example name currentPost Cashier name Post number Uses 1 1 In the implementation: Will A Cashier class will hold the current post it uses as a complex attribute (Post class) ? It should not be decided at this stage !!!

Concept vs. Attribute non-primitive attributes Consider an attribute as non-primitive type when: It is composed of separate sections (phone number) There are operations associated with it such as parsing or validation (ss#) It has other attributes (promotional price that has start/end dates) It is a quantity with a unit (payment amount has currency)

Concept vs. Attribute non-primitive attributes ProductSpecification upc:UPC ProductSpecification 1 * UPC Store address:Address * 1 Store Address … depends on your style

Concept vs. Attribute An Item Concept Example Item instance represents a physical item in a store Item has a description, price and UPC which are not recorded anywhere else Item Description Price SerialNumber UPC

Concept vs. Attribute Problems with Item Concept Duplicate data (description, price, UPC) Very space inefficient Assume store sells out Item X, Can we answer a question like: “how much item X cost”?

Concept vs. Attribute Problems with Item Concept Solution to Item concept problem is to add a new concept called ProductSpecification It represents a description of information about items Worse Better Item Description Price SerialNumber UPC ProductSpecification Description Price UPC Item SerialNumber 1 * Describes

Concept vs. Attribute Flight Example date number Route Time Airport name Flies-to 1 * All the flights are cancelled for 6 months How can you get record of flight routes?

Concept vs. Attribute Flight Example Worse Better Flight date time Described-by FlightDescription Number Route Flight date number Route Time Airport name * 1 Flies-to 1 * * Describes-flies-to 1 Airport name

Concept vs. Attribute Specification Concept In general, add a description or specification concept when Deleting instances of things they describe results in loss of information that needs to be maintained It reduces redundant or duplicate information

Add attributes in Point of Sale conceptual model SalesLineItem ProductCatalog ProductSpecificatin Register Item Sale Store Manager Payment Customer Cashier

Conceptual Model glossary Lists all terms used in the conceptual model to improve communication Should be created from the start and filled along the way Records terms from: Uses cases Conceptual model: Type and Attributes Contracts (later)

Conceptual Model glossary Commentsa Category Term Description of the process of a customer buying items in a store use Case Buy Item A short description of an item in a sale and its associated ProductSpecification attribute Productspecification.Description : Text An item for sale in a Store. type Item A sales transaction Sale The grand total of the Sale Sale.total : Quantity Terms are orders alphabetically In the comments when using another term, mark it by italics