Unit 2: Elaboration LH 10
– Concept
– Domain Models
– Finding conceptual classes and
description classes
– Associations Attributes
– Domain model refinement
– Finding conceptual class hierarchies
– Aggregation and Composition
– UML activity diagrams
Elaboration
Elaboration is the initial series of iterations
during which, on a normal project:
the core, risky software architecture is
programmed and tested
the majority of requirements are
discovered and stabilized
the major risks are mitigated or retired
Some key ideas and best practices will
manifest in elaboration:
do short timeboxed risk-driven iterations
start programming early
adaptively design, implement, and test the
core and risky parts of the architecture
test early, often, realistically
adapt based on feedback from tests,
users, developers
write most of the use cases and other
requirements in detail, through a series of
workshops, once per elaboration iteration
Domain Model
Domain model is a visual representation
of conceptual classes or real-situation in a
domain.
The domain models are also called as
conceptual models, domain object
models, or analysis object models.
The objects (conceptual classes) of the
domain are not software objects (classes).
Also known as Visual Dictionary
A domain model is illustrated with a set of
class diagrams in which no operations
(method signatures) are defined. It provides
a conceptual perspective. It may show:
domain objects or conceptual classes
associations between conceptual
classes
attributes of conceptual classes
What are Conceptual Classes?
Informally, a conceptual class is an idea,
thing, or object.
More formally, a conceptual class may be
considered in terms of its symbol, intension,
and extension.
Symbol: words or images representing
a conceptual class.
Intension: the definition of a
conceptual class.
Extension: the set of examples to
which the conceptual class applies.
Fig:- A conceptual class has a symbol,
intension, and extension.
How to Find Conceptual Classes?
Three Strategies to Find Conceptual Classes
:
1. Reuse or modify existing models
2. Use a category list
3. Identify noun phrases
1. Reuse or modify existing models
This is the first, best, and usually
easiest approach.
If there are published models, prior art,
or books use them.
There are published, well-crafted
domain models and data models (which
can be modified into domain models) for
many common domains, such as
inventory, finance, health, and so forth.
2. Use a category list
Table below contains many common
categories that are usually worth
considering, with an emphasis on
business information system needs.
The guidelines also suggest some
priorities in the analysis.
Examples are drawn from the
1) POS
2) Airline reservation domains
Conceptual Class Category Examples
business transactions Sale, Payment
Reservation
transaction line items SalesLineItem
product or service related to a transaction or Item
transaction line item Flight, Seat, Meal
where is the transaction recorded? Register, Ledger
FlightManifest
roles of people or organizations related to the Cashier, Customer, Store
transaction; actors in the use case Passenger, Airline
place of transaction; place of service Store
Airport, Plane, Seat
noteworthy events, often with a time or place we Sale, Payment
need to remember Flight
physical objects Item, Register
Airplane
descriptions of things ProductDescription
FlightDescription
catalogs ProductCatalog
FlightCatalog
containers of things (physical or information) Store
Airplane
other collaborating systems CreditAuthorizationSystem
AirTrafficControl
records of finance, work, contracts, legal Receipt, Ledger
matters MaintenanceLog
financial instruments Cash, Check,
LineOfCredit TicketCredit
3. Identify noun phrases
Identify the nouns and noun phrases in
textual descriptions of a domain, and
consider them as candidate conceptual
classes or attributes.
It is also called linguistic analysis.
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.
• Natural language is imprecise and
ambiguous, so you need to use judgment.
Description class
A description class contains
information that describes something
else.
For example, a ProductDescription
that records the price, picture, and text
description of an Item.
If we keep all the information in, say, a
sales line item, once all of that item are
sold, there is no record of what the item
was therefore we use description
classes.
ProductDescription
Description Item
Describes
Serial number
Price 1 *
ItemID
Association
An association is a structural
relationship that specifies that
objects of one thing are connected to
objects of another.
Given an association connecting
two classes, you can navigate from
an object of one class to an object of
the other class, and vice versa.
Adornments that apply to associations
1. Name
An association can have a name, and
we use that name to describe the nature
of the relationship.
We can give a direction to the name by
providing a direction triangle that points
in the direction we intend to read the
name.
2. Role
When a class participates in an
association, it has a specific role that it
plays in that relationship.
A role is just the face the class at the near
end of the association presents to the
class at the other end of the association.
3. Multiplicity
In many modeling situations, it's important
for us to state how many objects may be
connected across an instance of an
association.
This "how many" is called the multiplicity
of an association's role, and is written as
an expression that evaluates to a range of
values or an explicit value.
1.. *
*
Some typical examples of multiplicity:
Multiplicity Option Cardinality
0..0 0 Collection must be empty
0..1 No instances or one
instance
1..1 1 Exactly one instance
0..* * Zero or more instances
1..* At least one instance
5..5 5 Exactly 5 instances
m..n At least m but no more
than n instances
Aggregation
In plain association both classes are
conceptually at the same level, no one
more important than the other.
Sometimes, we will want to model a
"whole/part" relationship, in which one
class represents a larger thing (the
"whole"), which consists of smaller things
(the "parts"). This kind of relationship is
called aggregation, which represents a
"has-a" relationship.
Composition
Composition, also known as composite
aggregation, is a strong kind of whole-
part aggregation and is useful to show in
some models.
For example, in a windowing system, a
Frame belongs to exactly one Window. In
a composite aggregation, the whole is
responsible for the disposition of its parts,
which means that the composite must
manage the creation and destruction of its
parts.
Folder could contain many files, while each
File has exactly one Folder parent. If Folder
is deleted, all contained Files are deleted as
well.
Hospital has 1 or more Departments, and
each Department belongs to exactly one
Hospital. If Hospital is closed, so are all of its
Departments.
Consider showing composition when:
The lifetime of the part is bound within the
lifetime of the composite there is a create-
delete dependency of the part on the
whole.
There is an obvious whole-part physical or
logical assembly.
Some properties of the composite
propagate to the parts, such as the
location.
Operations applied to the composite
propagate to the parts, such as
destruction, movement, recording.
Attributes
An attribute is a logical data value of an
object.
It is useful to identify those attributes of
conceptual classes that are needed to
satisfy the information requirements of the
current scenarios under development.
Attribute Notation
Attributes are shown in the second
compartment of the class box
Name
Attributes
For Example: In POS system ‘Sale’ has at
least two attributes: Date and Time.
The full syntax for an attribute in the UML is:
visibility [ / ] name : type multiplicity = default {property-string}
+ :- Public [Optional]
- :- Private Derived Data
Sale Math
- dateTime : Date + pi : Real = 3.14 {readOnly}
- / total : Money
Person
firstName
middleName : [0..1]
lastName
If we do not think of some conceptual class
X as a number or text in the real world, X is
probably a conceptual class, not an attribute.
In Domain Model, Use Data Type Attributes
Primitive data types:
Boolean, String, Real, Integer, Date,
Time
Sometimes more complex, but not
domain specific:
Address, Color, Phone Number, Money
If it’s domain specific, use a class and
association
How to Create a Domain Model
• Find the conceptual classes
• Draw them as classes in a UML class
diagram
• Add associations necessary to record
relationships
• Add attributes necessary for information
to be preserved
• Use existing names, the vocabulary of
the domain
Example:
Case Study: POS Domain
Find and Draw Conceptual Classes
From the category list and noun phrase
analysis, a list is generated of candidate
conceptual classes for the domain.
The list is constrained to the requirements
and simplifications for the basic cash-only
scenario of Process Sale.
Sale Cashier
CashPayment Customer
SalesLineItem Store
Item ProductDescription
Register ProductCatalog
Ledger
UML activity diagrams
A UML activity diagram shows sequential
and parallel activities in a process. They
are useful for modeling business
processes, workflows, data flows, and
complex algorithms.
An activity diagram is a behavioral
diagram i.e. it depicts the behavior of a
system.
Activity diagram is essentially an
advanced version of flow chart that
modeling the flow from one activity to
another activity.
Benefits of activity diagrams
Activity diagrams present a number of
benefits to users. Consider creating an
activity diagram to:
Demonstrate the logic of an algorithm.
Describe the steps performed in a UML use
case.
Illustrate a business process or workflow
between users and the system.
Simplify and improve any process by
clarifying complicated use cases.
Model software architecture elements, such
as method, function, and operation.
Activity Diagram Notations
1. Initial State :-
Represents the beginning of a
process or workflow in an activity
diagram.
We use a black filled circle to depict
the initial state of a system.
Initial State
2. Action or Activity State :-
An activity represents execution of
an action on objects or by objects.
We represent an activity using a
rectangle with rounded corners.
Basically any action or event that
takes place is represented using an
activity.
Action or
Activity State
3. Action Flow or Control flows :-
Action flows or Control flows are also
referred to as paths and edges.
They are used to show the transition
from one activity state to another.
4. Decision node :-
When we need to make a decision
before deciding the flow of control,
we use the decision node.
Condition
5. Guards :-
A Guard refers to a statement written
next to a decision node on an arrow
sometimes within square brackets.
6. Fork :-
Splits a single activity flow into two
concurrent or parallel activities.
7. Join :-
Combines two concurrent activities
and re-introduces them to a flow
where only one activity occurs at a
time.
8. Merge :-
Bring back together different decision
paths that were created using a
decision-node.
9. Swimlanes :-
A way to group activities performed
by the same actor on an activity
diagram or to group activities in a
single thread.
Swimlanes
10. Final State or End State:-
Marks the end state of an activity and
represents the completion of all flows
of a process.
Example:
NextGen POS Activity Diagram
Authorization
Customer Cashier NextGen POS Service
Shop and
fill the cart
Cart Enter Cart
Items
Calculate taxes
and discounts
[else]
[Cash payment]
Submit
Authorize
Authorization
payment
request
Receipt Create Receipt
Hand Over
Items