Presentation is loading. Please wait.

Presentation is loading. Please wait.

Object Oriented Analysis and Design Conceptual Model.

Similar presentations


Presentation on theme: "Object Oriented Analysis and Design Conceptual Model."— Presentation transcript:

1 Object Oriented Analysis and Design Conceptual Model

2 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)

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

4 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

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

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

7 Identifying Concepts Two strategies: Concept Category List
Noun Phrase List

8 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)

9 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

10 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

11 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

12 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

13 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

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

15 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

16 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

17 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

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

19 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

20 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

21 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

22 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

23 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

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

25 Association rules Multiplicity values

26 Associations examples

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

28 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”

29 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

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

31

32

33

34

35 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

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

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

38 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

39 Conceptual Model Derived attributes

40 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

41 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

42 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

43 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

44 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

45 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

46 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 !!!

47 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 !!!

48 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)

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

50 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

51 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”?

52 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

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

54 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

55 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

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

57

58

59 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)

60 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

61


Download ppt "Object Oriented Analysis and Design Conceptual Model."

Similar presentations


Ads by Google