1 Chapter 9: Conceptual Model Chapter 10, 11 & 12 in Applying UML and Patterns Book.

Slides:



Advertisements
Similar presentations
Object Design Examples with GRASP
Advertisements

OOAD Using the UML - Use-Case Analysis, v 4.2 Copyright  Rational Software, all rights reserved 1/18 Use Case Analysis – continued Control Classes.
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.
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.
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.
Chapter 9 Domain Models 1CS6359 Fall 2012 John Cole.
חוזים – 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.
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’
Use Case modelling 1. Objectives  Document user requirements with a model  Describe the purpose of an actor and a use case  Construct a use case model.
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,
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.
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.
USE CASE Bayu Adhi Tama, MTI Faculty of Computer Science, University of Sriwijaya Slides are adapted from Petrus Mursanto
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)
1 Relational Databases and SQL. Learning Objectives Understand techniques to model complex accounting phenomena in an E-R diagram Develop E-R diagrams.
Structural Modeling. Objectives O Understand the rules and style guidelines for creating CRC cards, class diagrams, and object diagrams. O Understand.
1 Lecture 6: Operation Contracts. 2 Overview  What is contract ?  The guidelines for writing contracts for the system operations.  Use Case realizations.
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
♦ 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.
Lecture 6: Structural Modeling
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
Business Analysis with For PG MDI, Gurgaon Kamna Malik, Ph.D.
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 2A: Attributes.
January Ron McFadyen1 Domain Models Domain Model: a visual representation of conceptual classes or real-world objects in a domain of interest.
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.
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.
System Sequence Diagrams and Operation Contracts
Domain Model: Visualizing concepts
Conceptual Model.
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
Relating Use Cases popo.
Conceptual Model or Domain Models
Object Oriented Analysis and Design Conceptual Model.
Domain Model: Visualizing Concepts
Presentation transcript:

1 Chapter 9: Conceptual Model Chapter 10, 11 & 12 in Applying UML and Patterns Book.

2 Overview  UML overview, where are we now?  Understands what concept model is.  Concepts.  Attributes.  Associations.  Knowing how to draw a concept model either from the problem domain or the use case.

3 UML Process Overview 1) Use Cases  Define user interaction with the system. 2) Conceptual Model << we are here right now.  Underline nouns to identify concepts in the problem domain.  Use the underlined nouns from the use cases to create the concepts in the conceptual model.  Some of the nouns, if they identify simple data types, are used to create attributes of these concepts.  Create associations between the concepts.

4 UML Process Overview 3) System Sequence Diagram << we have done this it can be done before or after conceptual model or in parallel with it.  Create system sequence diagrams for each use case scenario.  Each sequence event in the diagram corresponds to a user interaction with the system specified by the expanded use case. 4) System Contracts  Specify post-conditions for each system event in the system sequence diagrams.  Use the conceptual model to identify objects created, associations formed, and attributes modified.

5 UML Process Overview 5) Collaboration Diagram  Create a collaboration diagram for each system event.  Apply patterns. 6) Class Diagram  Add methods and additional attributes which were discovered in the collaboration diagrams to the classes in the conceptual model.

6 UML Process Overview 7) Code  Create classes with their names, attributes and method signatures taken from the class diagram.  For each method on a class, use the collaboration diagrams to find the sequence of messages generated when the method is called and create at least one line of code for each message.

7 Conceptual (Domain) Model  Is also named domain model.  Is an analysis-level activity.  A model of real-world objects and NOT an attempt to design the actual software.

8 Conceptual (Domain) Model  A domain model illustrates meaningful concepts in a problem domain.  It’s a representation of real-world things, not software components.  It’s a set of static structure diagrams; no operations are defined.  It may show:  Concepts  Attributes of concepts.  Associations between concepts.

9

10 Patron Loan Librarian Book Library

11 Conceptual (Domain) Model  A domain model is a description of things in the real world.  A domain model is NOT a description of the software design.  A concept is an idea, thing, or object.

12

13 Cashier customer Items Sale Sale line item POS Store

14 Conceptual Classes in the Sale Domain  A central distinction between object-oriented and structured analysis: division by concepts (objects) rather than division by functions.

15 Strategies to Identify Conceptual Classes  Use a conceptual class category list.  Make a list of candidate concepts.  Use noun phrase identification.  Identify noun (and noun phrases) in textual descriptions of the problem domain, and consider them as concepts or attributes.  Use cases are excellent description to draw for this analysis.

16 Use a Conceptual Class Category List Example Concept Category POS, AirplanePhysical or tangible objects. Product Specification, Flight Description Specifications, designs, or descriptions of things. Store, AirportPlaces. Sale, Payment, ReservationTransactions. Sales Line ItemTransaction line items. Cashier, PilotRoles of people. Store, Bin, AirplaneContainers of other things. * See complete list in Larman 2 nd edition, P.G

17 Finding a Conceptual Classes with Noun Phrase Identification  The fully addressed use cases are an excellent description to draw for this analysis.  Some of these noun phrases are candidate concepts; some may be attributes of concepts.  A mechanical noun-to-concept mapping is not possible, as words in a natural language are (sometimes) ambiguous. Process Sale Use Case (Buy Items) 1. This use case begins when a Customer arrives at a POS checkout with items to purchase. 2. The Cashier starts a new sale. 3. Cashier enters item identifier. …

18 Advantages of Noun Phrase Identification  Narrative language is well understood by everyone on a project.  An effective communication medium for both technical and non-technical project staff.  Usually, one-to-one mapping from nouns to objects or classes or interfaces.  No learning curve.

19 Disadvantages of Noun Phrase Identification  The imprecision of natural language.  Different noun phrases may represent the same conceptual class or attribute, among other ambiguities.  Nouns do not always result in classes, or objects in the problem domain.  Many sentences in a functional specification may be in the wrong form for easy identification of the objects and classes. For example, ”roll back the transaction” or “the software will compute the average salary”.  In many cases, the nouns, especially subjects to sentences, refer to: 1)An entire assembly or a computer software configuration, 2)A sub assembly or a software component, 3)An attribute, 4)Service.

20 Recommended Approach  Noun phrase technique.  Interview the domain experts.  Conceptual Class Category List.  Consider whether:  it is any real-life entity.  it is important to the requirement discussion.  Finally, we need additional steps:  Use the use cases to generate scenarios.  Use the scenarios to find missing categories and interfaces.  Record the scenarios.

21 The Need for Specification or Description Conceptual Classes  What is wrong with this picture?  Consider the case where all items are sold, and thus deleted from the computer memory.  How much does an item cost?

22 The Need for Specification or Description Conceptual Classes  The memory of the item’s price was attached to inventoried instances, which were deleted.  Notice also that in this model there is duplicated data (description, price, itemID).

23 The Need for Specification or Description Conceptual Classes  Add a specification or description concept when:  Deleting instances of things they describe results in a loss of information that needs to be maintained, due to the incorrect association of information with the deleted thing.  It reduces redundant or duplicated information.

24 The NextGen POS (Partial) Domain Model

25 Adding Associations

26 Finding Associations Common Associations List ExampleCategory Drawer - POSA is a physical part of B SalesLineItem - SaleA is a logical part of B POS - StoreA is physically contained in/on B ItemDescription - CatalogA is logically contained in B ItemDescription - ItemA is a description for B SalesLineItem - SaleA is a line item of a transaction or report B Sale - POSA is known/logged/recorded/captured in B Cashier - StoreA is a member of B * See complete list in Larman 2 nd edition, P.G

27 Multiplicity  Multiplicity defines how many instances of a type A can be associated with one instance of a type B, at a particular moment in time.  For example: a single instance of a Store can be associated with “many” (zero or more) Item instances.

28 Multiplicity

29 Naming Associations  Name an association based on a TypeName- VerbPhrase-TypeName format.  Association names should start with a capital letter.  A verb phrase should be constructed with hyphens.  The default direction to read an association name is left to right, or top to bottom.

30 Multiple Associations Between Two Types  It’s not uncommon to have multiple associations between two types.  In the example, not every flight is guaranteed to land at an airport.

31 Adding Attributes  An attribute is a logical data value of an object.  Include the following attributes: those for which the requirements suggest or imply a need to remember information.  For example, a Sales receipt normally includes a date and time.  The Sale concept would need a date and time attribute.

32 Valid Attributes Types  Keep attributes simple.  The type of an attribute should NOT normally be a complex domain concept, such as Sale or Airport.  Attributes in a Domain Model should preferably be:  Pure data values: Boolean, Date, Number, String,...  Simple attributes: color, phone number, zip code, universal product code (UPC),...

33 We are not finished with the attributes yet!!  We still need to discuss:  Class-based types.  Attribute visibility.  These issues require deeper knowledge of modelling. Hence, they will be discussed later on as the course progresses.

34 Domain Model Conclusion

35 University Case Study We need to write an application supporting us in managing the information about university operation. Right now, at Stockholm University we have a substantial amount of students students. To manually manage all information about students is simply impossible. Hence, SU needs some automated support. In addition to this, we need handle information on courses and lecturers giving these courses. Recently, SU has taken over the library and book shops. They want to provide better service to their students, and they want to better integrate the management of course literature with all other courses given at SU. Hence, they wish to automate the book management as well. This gives them better insight into the education on the course level, and provides a solid basis for evaluating the courses and a basis for establishing the incremental educational programme. The knowledge of which books are utilised on which course helps them identify the overlapping in the educational material. To be able to provide high quality education, SU must have highly competent lecturers. SU wishes to store information about their lecturers and their state of competence and its development. By competence, SU means professional, pedagogical and administrative competence. Underline concepts (or maybe attributes), Red means association or transaction category concept.

36 University Case Study Conceptual Classes Student Book Lecturer Course Book shop Library University Do we need a class called University? Course Evaluation Course Overlapping Competence Evaluation

37 Advice When Finding attributes  How is the object described in general?  What parts of the general description are applicable to this problem domain?  What is the minimal description needed for this application?

38 University Case Study Attributes Student pnr: Integer student_name: String address: String nationality: String degree_level: String grade: Integer IQ Integer $average_age: Integer Teacher pnr: Integer teacher_name: String role: String ped_competence: String admin_competence: String prof_competence: String percentage_of_full_time: Integer salary: Integer martial_state: String research_engagement: String Course course_number: Integer course_name: String course_description: String no_of_students: Integer teacher_name: String equipment_type: String Book book_number: Integer ISBN_number: String title: String price: Real

39 University Case Study Associations Students at SU may take many different courses. The students however, should not take more than five courses during one semester. A course may only start if there are at least 15 students registered. Otherwise, the course has to be cancelled. Teaching for less than 15 students would be too expensive. The courses are taught by lecturers. The fact that you are a lecturer does not hinder you from taking courses at university. There may be cases that a lecturer takes and teaches on one and the same course simultaneously. This is in cases when the lecturer is a PhD student. The work he has put into developing and teaching on a course will give him credit point within his PhD studies. So lecturers may take courses as well. Each university course is based on some book. One course may be based on at least one book. However, many books may be read on one and the same course. Blue means constraint, many to many will be implemented by adding a transaction class.

40 University Case Study Associations

41 University Case Study Associations We do not need these any more!