OO DomainModeling With UML Class Diagrams and CRC Cards Chapter 6 Princess Nourah bint Abdulrahman University College of Computer and Information Sciences.

Slides:



Advertisements
Similar presentations
Object-Oriented Analysis and Design CHAPTERS 8, 9: BASICS, INTRO TO DOMAIN MODELS 1.
Advertisements

Chapter 22 Object-Oriented Systems Analysis and Design and UML Systems Analysis and Design Kendall and Kendall Fifth Edition.
Ch 12: Object-Oriented Analysis
Assignment I, part 1. Groups of three students. Specify one as group leader. group names to TA and me. Create an object-oriented conceptualization.
CS3773 Software Engineering Lecture 03 UML Use Cases.
Introduction To System Analysis and Design
January Ron McFadyen1 Ch 9. Use-case model: drawing System Sequence Diagrams Elaboration Iteration 1: a simple cash-only success scenario of.
Solving the Problem Analysis & Design.
Lecture 4 Class Responsibility Collaboration Cards
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.
How to Make a Domain Model Tutorial
Chapter 9 Domain Models. Domain Model in UML Class Diagram Notation A “visual dictionary”
OO Analysis and Design CMPS OOA/OOD Cursory explanation of OOP emphasizes ▫ Syntax  classes, inheritance, message passing, virtual, static Most.
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’
Glenn David Blank Computer Science & Engineering Department Lehigh University, Bethlehem, PA, USA With support from the National Science Foundation (Grants.
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.
5 Systems Analysis and Design in a Changing World, Fourth Edition.
UML Diagrams: Class Diagrams The Static Analysis Model Instructor: Dr. Hany H. Ammar Dept. of Computer Science and Electrical Engineering, WVU.
TK2023 Object-Oriented Software Engineering CHAPTER 5 DOMAIN MODELLING.
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.
USE CASE Bayu Adhi Tama, MTI Faculty of Computer Science, University of Sriwijaya Slides are adapted from Petrus Mursanto
Copyright 2002 Prentice-Hall, Inc. Chapter 2 Object-Oriented Analysis and Design Modern Systems Analysis and Design Third Edition Jeffrey A. Hoffer Joey.
Review ♦ System sequence diagram ♦ Domain model
Lecture 9 Enterprise Systems Development ( CSC447 ) COMSATS Islamabad Muhammad Usman, Assistant Professor.
Structural Modeling. Objectives O Understand the rules and style guidelines for creating CRC cards, class diagrams, and object diagrams. O Understand.
Behavioral Modeling: Sequence and Communication Diagrams Copyright © 2009 John Wiley & Sons, Inc. Copyright © 2005 Pearson Education Copyright © 2009 Kannan.
CS3773 Software Engineering Lecture 04 UML Class Diagram.
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
SYS466: Analysis and Design Using OO Models Domain Class Diagram.
Lecture 6: Structural Modeling
1 System Analysis and Design Using UML INSTRUCTOR: Jesmin Akhter Lecturer, IIT, JU.
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
Design Model Lecture p6 T120B pavasario sem.
BTS430 Systems Analysis and Design using UML Domain Model—Part 2: Associations and Attributes.
Repetition af Domæne model. Artifact influence emphasizing the Domain Model.
CS212: Object Oriented Analysis and Design Lecture 32: Use case and Class diagrams.
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.
Summary from previous lectures
Object-Oriented Software Engineering Practical Software Development using UML and Java Modelling with Classes.
High Level Design Use Case Textual Analysis SE-2030 Dr. Mark L. Hornick 1.
5 Systems Analysis and Design in a Changing World, Fourth Edition.
Elaboration popo.
Chapter 9 Domain Models.
Domain Model: Visualizing concepts
Conceptual Model.
OO Domain Modeling With UML Class Diagrams and CRC Cards
Software Engineering System Modeling Chapter 5 (Part 2) Dr.Doaa Sami
Software Engineering System Modeling Chapter 5 (Part 2) Dr.Doaa Sami
OO Domain Modeling With UML Class Diagrams and CRC Cards
Princess Nourah bint Abdulrahman University
Princess Nourah bint Abdulrahman University
Relating Use Cases popo.
Group Members Muhammad Zeeshan ( 16) Adnan Akhtar (4)
Software Engineering System Modeling Chapter 5 (Part 1) Dr.Doaa Sami
Object Oriented Analysis and Design Conceptual Model.
Domain Model: Visualizing Concepts
Presentation transcript:

OO DomainModeling With UML Class Diagrams and CRC Cards Chapter 6 Princess Nourah bint Abdulrahman University College of Computer and Information Sciences Department of Computer Science Dr. Doaa Sami Khafaga

Objectives The main objective of this chapter is to know: how to properly use the most essential features of UML class diagrams, and the typical problems you will encounter when modeling with class diagrams. In this chapter we: ● Introduce the evolutionary approach for building classes ● Explain how to identify objects and attributes of classes ● Describe the technique of CRC ‘Class Responsibility and Collaborator’ ● Explain how classes are related in a class diagram ● Explain generalization, association, aggregation and composition ● Introduce object diagrams S.H 2009 Software EngineeringOO Domain Modeling

What is a Domain Model? ● Use cases looked at the system’s environment (actors) and the system’s external behavior. ● Use cases consider the system as a black box and help us understand how the system as a whole interacts with the outside word. ● Now we turn to consider the inside of the system. We do this by building the domain model, which shows what the black box (the system) encloses. ● uses cases elaborate the system’s behavioral characteristics (sequence of stimulus-response steps), ● domain model gives details of the systems structural characteristics (system parts and their arrangement) S.H 2009 Software EngineeringOO Domain Modeling

What is a Domain Model? ● uses cases elaborate the system’s behavioral characteristics (sequence of stimulus-response steps), ● domain model gives details of the systems structural characteristics (system parts and their arrangement) ● The next step is to model the inside of the system. We do this by building the domain model, which shows what the black box (the system) encloses. S.H 2009 Software EngineeringOO Domain Modeling

What is a Domain Model? ● Illustrates meaningful concepts in the problem domain. ● Usually expressed in the form of static diagrams (in Rational this implies a high-level class diagram). ● Is a representation of real-world things; not software components (of the system under development). ● No operations are defined or specified in the conceptual model. ● Should show concepts, associations between concepts, and attributes of concepts. ● Serves as a source of software objects. S.H 2009 Software EngineeringOO Domain Modeling

What is a Domain Model? Objectives ● identify concepts related to current development cycle requirements ● create initial conceptual model ● Identify attributed ● add specification concepts S.H 2009 Software EngineeringOO Domain Modeling

What is a Domain Model? S.H 2009 Software EngineeringOO Domain Modeling

What constitutes a good model? A model should ● use a standard notation ● be understandable by clients and users ● lead software engineers to have insights about the system ● provide abstraction. Models are used: ● to help create designs ● to permit analysis and review of those designs ● as the core documentation describing the system. S.H 2009 Software EngineeringOO Domain Modeling

From Use Cases to: Objects, Attributes, Operations (methods) -“evolutionary ” S.H 2009 Software EngineeringOO Domain Modeling

Building the Domain Model A useful strategy for building a domain model is to start with: ● the “boundary” concepts that interact directly with the actors ● and then identify the internal concepts S.H 2009 Software EngineeringOO Domain Modeling

Domain Model Relationships Domain Model Interaction Diagrams Dynamic Behavior Conceptual Class Diagram Classes, attributes, associations Domain objects Use Case Model Functional Requirements Define terms Glossary S.H 2009 Software EngineeringOO Domain Modeling

Steps to create a Domain Model Steps ● Identify Candidate Conceptual classes ● Draw them in a Domain Model ● Add associations necessary to record the relationships that must be retained ● Add attributes necessary for information to be preserved S.H 2009 Software EngineeringOO Domain Modeling

Find conceptual classes S.H 2009 Software EngineeringOO Domain Modeling

Use a category list ● Finding concepts using the concept category list : ● Physical objects: register, airplane, blood pressure monitor ● Places: airport, hospital ● Catalogs: Product Catalog ● Transactions: Sale, Payment, reservation S.H 2009 Software EngineeringOO Domain Modeling

Identify conceptual classes from noun phrases ● Finding concepts using Noun Phrase identification in the textual description of the domain. ● Noun phrases may also be attributes or parameters rather than classes: ● If it stores state information or it has multiple behaviors, then it’s a class ● If it’s just a number or a string, then it’s probably an attribute S.H 2009 Software EngineeringOO Domain Modeling

Identifying objects S.H 2009 Software EngineeringOO Domain Modeling

Identifying Operations ‘methods’ S.H 2009 Software EngineeringOO Domain Modeling

Objects S.H 2009 Software EngineeringOO Domain Modeling

Example: Identify conceptual classes from noun phrases Consider the following problem description, analyzed for Subjects, Verbs, Objects: S.H 2009 Software EngineeringOO Domain Modeling The ATM verifies whether the customer's card number and PIN are correct. S C V R OO A O A If it is, then the customer can check the account balance, deposit cash, and withdraw cash. S R VO A VO A VO A Checking the balance simply displays the account balance. S M O A VO A Depositing asks the customer to enter the amount, then updates the account balance. M SVO R VO A VO A Withdraw cash asks the customer for the amount to withdraw; if the account has enough cash, S M A OVO R O A VS C VO A the account balance is updated. The ATM prints the customer’s account balance on a receipt. O A V C SVO A O Analyze each subject and object as follows: ● Does it represent a person performing an action? Then it’s an actor, ‘R’. ● Is it also a verb (such as ‘deposit’)? Then it may be a method, ‘M’. ● Is it a simple value, such as ‘color’ (string) or ‘money’ (number)? Then it is probably an attribute, ‘A’. ● Which NPs are unmarked? Make it ‘C’ for class. Verbs can also be classes, for example: ● Deposit is a class if it retains state information

Mapping parts of speech to object model components [Abbott, 1983] S.H 2009 Software EngineeringOO Domain Modeling Part of SpeechModel ComponentExamples Proper nounInstanceAli Common nounClassStudent, Customer,.. Doing verbOperationBuy, check,.. Being verbInheritanceIs a kind of, is one of either Having verbAggregation (Composition) Has, consists of, includes Modal verbConstraintsMust be Adjective attributesAttributes3 years old

Example: a typical description S.H 2009 Software EngineeringOO Domain Modeling

Mapping parts of speech to object model components S.H 2009 Software EngineeringOO Domain Modeling

Identify conceptual classes from noun phrases: POS ● Examine use case descriptions. ● Example: Process Sale use case: ● Main success scenario: ● Customer arrives at a POS checkout counter. ● Cashier starts a new sale. ● Cashier enters an item ID. ● System records sale line item. It then presents a description of the item, its price, and a running total. ● …. ● Possible source of confusion: Is it an attribute or a concept? ● If X is not a number or a text then it probably is a conceptual class. S.H 2009 Software EngineeringOO Domain Modeling

Example: Initial POS domain model S.H 2009 Software EngineeringOO Domain Modeling SalesLineItem Item Sale Register Store Payment

Class and Class diagram Class naming: Use singular names because each class represents a generalized version of asingular object. Class diagrams are at the core of OO Engineering. Things naturally fall into categories (computers, automobiles, trees...). We refer to these categories as classes. An object class is an abstraction over a set of objects with common: attributes (states) and the services (operations) (methods) provided by each object Class diagrams provide the representations used by the developers. S.H 2009 Software EngineeringOO Domain Modeling

Example: Initial POS domain model S.H 2009 Software EngineeringOO Domain Modeling

Example: Initial Domain model of the Monopoly Game S.H 2009 Software EngineeringOO Domain Modeling

Example: Domain model of the Monopoly Game S.H 2009 Software EngineeringOO Domain Modeling

Agile modeling style S.H 2009 Software EngineeringOO Domain Modeling

S.H 2009 Software EngineeringOO Domain Modeling

S.H 2009 Software EngineeringOO Domain Modeling

S.H 2009 Software EngineeringOO Domain Modeling

S.H 2009 Software EngineeringOO Domain Modeling

S.H 2009 Software EngineeringOO Domain Modeling

S.H 2009 Software EngineeringOO Domain Modeling

S.H 2009 Software EngineeringOO Domain Modeling

S.H 2009 Software EngineeringOO Domain Modeling

Class or Attributes S.H 2009 Software EngineeringOO Domain Modeling

Class or Attributes S.H 2009 Software EngineeringOO Domain Modeling

Description Class S.H 2009 Software EngineeringOO Domain Modeling

Associations S.H 2009 Software EngineeringOO Domain Modeling

Associations S.H 2009 Software EngineeringOO Domain Modeling

Association, aggregation and composition S.H 2009 Software EngineeringOO Domain Modeling

Association between classes Who does What S.H 2009 Software EngineeringOO Domain Modeling

When to show association S.H 2009 Software EngineeringOO Domain Modeling

Associations and implementation S.H 2009 Software EngineeringOO Domain Modeling

Association Notation S.H 2009 Software EngineeringOO Domain Modeling

Association Notation S.H 2009 Software EngineeringOO Domain Modeling

Naming association S.H 2009 Software EngineeringOO Domain Modeling

Applying UML: multiplicity S.H 2009 Software EngineeringOO Domain Modeling

Multiplicity values S.H 2009 Software EngineeringOO Domain Modeling

Applying UML: multiplicity S.H 2009 Software EngineeringOO Domain Modeling

Applying UML: multiplicity S.H 2009 Software EngineeringOO Domain Modeling

Multiple association between two classes S.H 2009 Software EngineeringOO Domain Modeling

Find association S.H 2009 Software EngineeringOO Domain Modeling

Find association ● High priority associations ● A is a physical or logical part of B ● A is physically or logically contained in/on B ● A is recorded in B ● Other associations ● A uses or manages or controls B (Pilot -airplane) ● A owns B (Airline -airplane) ● Each of the two ends of an association is called a role. Roles have ● name ● multiplicity expression ● navigability S.H 2009 Software EngineeringOO Domain Modeling

Example: POS Domain Model S.H 2009 Software EngineeringOO Domain Modeling

Example: Monopoly Game Partial Domain Model S.H 2009 Software EngineeringOO Domain Modeling

Attributes ● Attribute - is a logical data value of an object ● Include the following attributes in a conceptual model ● those for which the requirements suggest or imply a need to remember information ● For example: ● Sale needs a dateTime attribute ● Store needs a name and address. S.H 2009 Software EngineeringOO Domain Modeling

Attributes: UML Notation S.H 2009 Software EngineeringOO Domain Modeling

Suitable attribute types S.H 2009 Software EngineeringOO Domain Modeling

Data types as attributes S.H 2009 Software EngineeringOO Domain Modeling

Attributes are NOT foreign keys S.H 2009 Software EngineeringOO Domain Modeling

Generalization S.H 2015 Software EngineeringOO Domain Modeling