You are on page 1of 27

OBJECT ORIENTED

DESIGN AND ANALYSIS


LECTURE # 9

Dr. Khubaib Amjad Alam


Contact Information
2

 Instructor: Dr. Khubaib Amjad Alam


Assistant Professor
Department Of Computer Science
FAST-NUCES (CFD)

Email: khubaib.amjad@nu.edu.pk
3
Course Information
 Course Name: Object Oriented Analysis And Design

 Course Code: CS309

 Course Link:
http://slate.nu.edu.pk/portal/site/FSDCS309FALL2016CS/page/FSD
CS309FALL2016CS-1300
4
Topics to Cover
 Domain Model

Engr. Ali Javed


Domain Model
5

 Domain model involves an identification of the concepts, attributes, and


associations that are considered noteworthy.

 Still real life not exactly software based yet.

 Software based will be in class diagram


Concepts
6

 Concept is an idea, thing, noun or object has symbol,


intension, and extension
Domain Model

 A central distinction between object-oriented and structured analysis :


division by concepts (objects) rather than division by functions.

 It is better to overspecify a domain model with lots of fine- grained


concepts, than to underspecify it.
Domain Model
8

 A domain model is widely used as a source of inspiration for designing


software objects, and will be a required input to several subsequent
artifacts
 A domain model illustrates meaningful conceptual classes in a problem
domain; it is the most important artifact to create during object-oriented
analysis.

 The identification of conceptual classes is part of an


investigation of the problem domain

 The UML contains notation in the form of class diagrams to illustrate


domain models.
Domain Model
9

 The essential object-oriented step in analysis or investigation is the


decomposition of a domain of interest into individual conceptual classes
or objects

 A domain model is a visual representation of conceptual classes


or objects in a domain of interest

 They have also been called conceptual models, domain object


models, and analysis object models

 Domain Model is one of the artifacts that may be created in the


Business Modeling discipline
Domain Model
10

 Using UML notation, a domain model is illustrated with a set of


class diagrams in which no operations are defined.

 It may show:

 domain objects or conceptual classes


 associations between conceptual classes
 attributes of conceptual classes
Domain Models are not Models for
11 Software Components
 A domain model, as shown in Figure 4, is a visualization of things in
the real world domain of interest, not of software components such as
a Java or C++ class (see Figure 5), or software objects with responsibilities.

 Therefore methods representing functionality or detailed behavior are


not suitable in a domain model

Figure 4:: A domain model shows real world


conceptual classes, not software classes Figure 5:: A domain model does not show software
artifacts or classes
Conceptual Class Identification
12

 Classes can be identified through identifying the following::


 Noun Phrases
 Physical or tangible objects
 Places
 Roles of People
 Organizations
 Document [e.g book] e.t.c

 In short any thing which can have attributes and operations associated
with it can be designated as class.
How to make a Domain Model
13

 Apply the following steps to create a domain model:

1. List the candidate conceptual classes by identifying all those things


which can have attributes and ultimately operations or functions
associated with it related to the current requirements under
consideration

2. Draw them in a domain model (A domain model is a kind of map of concepts


or things in a domain.)

3. Add the associations necessary to record the relationships between the


classes.

4. Add the associations necessary to fulfill information requirement.


Construction of Domain Model
14
Specification/ Description Concepts

 An Item instance represents a physical item in a store; it may


even have a serial number (unique).
 An Item has a description, price, and UPC ,which are not
 recorded anywhere else.
 When a real physical item is sold, a corresponding software instance of
Item is deleted.

 Should we have a single concept or two separate as Item and its


description?
Specification/ Description Concepts
Resolving Similar Concepts
Concept vs. Attribute
Concept vs. Attribute
Association Concepts

 Association is a relation b/w concepts that indicates some

meaningful and interesting connection.

 Naming Association
 verb phrase creates a sequence that is readable and meaningful.
 verb phrase should have –default direction left-right or top- bottom (if
against the default direction, readability arrow must be there) Example is
on next slide
Example
Multiplicity
Common Association List
Common Association List
Attributes

 It is useful to identify those attributes of conceptual classes


that are needed to satisfy the information requirements.

 An attribute is a logical data value of an object.


Notation
For any query Feel Free to ask
44

You might also like