Exam
Exam
CT015-3-2 Version 1
CT015-3-2 Design Methods Object Oriented Analysis and Modelling Part 1 Slide <2> of 18
Learning Objectives
CT015-3-2 Design Methods Object Oriented Analysis and Modelling Part 1 Slide <3> of 18
Key Terms
• UML
• Model
• Diagram
CT015-3-2 Design Methods Object Oriented Analysis and Modelling Part 1 Slide <4> of 18
UML
CT015-3-2 Design Methods Object Oriented Analysis and Modelling Part 1 Slide <5> of 18
UML Models
CT015-3-2 Design Methods Object Oriented Analysis and Modelling Part 1 Slide <5> of 18
UML Model
• Use models to:
– Specify structure, behavior, or both
– Visualize an existing system to improve understanding
– Automate system development (Model-Driven Development)
• UML model files (.emx) contain:
– Model elements
– Diagrams
– Profile information
– User preferences
– Workspace information
CT015-3-2 Design Methods Object Oriented Analysis and Modelling Part 1 Slide <6> of 18
Developing multiple model
CT015-3-2 Design Methods Object Oriented Analysis and Modelling Part 1 Slide <7> of 18
UML Diagrams
• UML diagrams graphically depict a view of a part of your
model or code
• Different diagrams represent different views of the system
you are developing
• A model element appears in zero or more diagrams
CT015-3-2 Design Methods Object Oriented Analysis and Modelling Part 1 Slide <8> of 18
UML diagram versus UML model
CT015-3-2 Design Methods Object Oriented Analysis and Modelling Part 1 Slide <9> of 18
UML Views
• There are five different views that the UML aims to
visualize through different modeling diagrams
– User's View
– Structural Views
– Behavioral Views
– Environmental View
– Implementation View
CT015-3-2 Design Methods Object Oriented Analysis and Modelling Part 1 Slide <8> of 18
UML Diagrams Types
CT015-3-2 Design Methods Object Oriented Analysis and Modelling Part 1 Slide <10> of 18
How many diagrams do you
need?
• Depends on the artifacts being modeled and the needs of users
– Use diagrams to visualize the system from different
perspectives
– No complex system can be understood in its entirety from
only one perspective
• Model elements can appear in zero or more diagrams
– A class can:
• Appear in zero or more class diagrams
• Be represented in a state machine diagram
• Have instances that appear on a sequence diagram
– Each diagram provides a different perspective
CT015-3-2 Design Methods Object Oriented Analysis and Modelling Part 1 Slide <11> of 18
Creating UML diagrams
CT015-3-2 Design Methods Object Oriented Analysis and Modelling Part 1 Slide <12> of 18
Freeform diagrams and geometric
shapes
• Freeform diagrams can include UML and non-UML
Elements
– No free-form modelling standards
– Most common that included when creating UML
packages
– Can display geometric shapes and another non-UML
notation
– Use for sketches and other informal modeling
CT015-3-2 Design Methods Object Oriented Analysis and Modelling Part 1 Slide <13> of 18
Freeform diagrams and geometric
shapes
CT015-3-2 Design Methods Object Oriented Analysis and Modelling Part 1 Slide <13> of 18
Review : Diagram editor
CT015-3-2 Design Methods Object Oriented Analysis and Modelling Part 1 Slide <14> of 18
Quick & Review Question
• What is UML?
• List all UML diagram.
• What is free form diagrams?
CT015-3-2 Design Methods Object Oriented Analysis and Modelling Part 1 Slide <15> of 18
Summary of Teaching points
CT015-3-2 Design Methods Object Oriented Analysis and Modelling Part 1 Slide <16> of 18
Q&A
CT015-3-2 Design Methods Object Oriented Analysis and Modelling Part 1 Slide <17> of 18
What We Will Cover Next
CT015-3-2 Design Methods Object Oriented Analysis and Modelling Part 1 Slide <18> of 18
Design Methods
CT015-3-2 Version 1
CT015-3-2 Design Methods Object Oriented Analysis and Modelling Part 1 Slide <2> of 32
Learning Objectives
CT015-3-2 Design Methods Object Oriented Analysis and Modelling Part 1 Slide <3> of 32
Key Terms
• Notations
CT015-3-2 Design Methods Object Oriented Analysis and Modelling Part 1 Slide <4> of 32
Use case diagram
CT015-3-2 Design Methods Object Oriented Analysis and Modelling Part 1 Slide <5> of 32
Use case diagram
CT015-3-2 Design Methods Object Oriented Analysis and Modelling Part 1 Slide <6> of 32
Classes and Objects
CT015-3-2 Design Methods Object Oriented Analysis and Modelling Part 1 Slide <7> of 32
Classes and Objects
CT015-3-2 Design Methods Object Oriented Analysis and Modelling Part 1 Slide <9> of 32
Class diagram
CT015-3-2 Design Methods Object Oriented Analysis and Modelling Part 1 Slide <10> of 32
Class diagram
CT015-3-2 Design Methods Object Oriented Analysis and Modelling Part 1 Slide <11> of 32
Interaction diagram:
Communication diagram
• Shows how cooperating objects
dynamically interact with each other by
sending and receiving messages.
• Objects are shown as boxes,
and lines joining boxes represent
object interconnection.
• Labeled arrows indicate the name
and direction of message transmission
between objects and must be numbered.
• Iteration is indicated by an asterisk (∗)
• An optional condition means that the
message is sent only if the condition is true.
CT015-3-2 Design Methods Object Oriented Analysis and Modelling Part 1 Slide <12> of 32
Interaction diagram: Sequence
diagram
• A two-dimensional diagram in which the objects participating in the
interaction are depicted horizontally and the vertical dimension
represents time.
• Starting at each object box is a vertical dashed line, referred to as a
lifeline. (Optionally, each lifeline has an activation bar, depicted as a
double solid line, which shows when the object is executing )
• Labeled horizontal arrows represent messages which sent from the
source object to the destination object.
CT015-3-2 Design Methods Object Oriented Analysis and Modelling Part 1 Slide <13> of 32
State machine diagram
CT015-3-2 Design Methods Object Oriented Analysis and Modelling Part 1 Slide <14> of 32
State machine diagram
CT015-3-2 Design Methods Object Oriented Analysis and Modelling Part 1 Slide <15> of 32
State machine diagram
CT015-3-2 Design Methods Object Oriented Analysis and Modelling Part 1 Slide <16> of 32
Composite state with orthogonal
substates
• When the composite B is initially entered,
each of the substates B1 and B3 is also
entered.
CT015-3-2 Design Methods Object Oriented Analysis and Modelling Part 1 Slide <17> of 32
Packages
CT015-3-2 Design Methods Object Oriented Analysis and Modelling Part 1 Slide <18> of 32
Packages
CT015-3-2 Design Methods Object Oriented Analysis and Modelling Part 1 Slide <19> of 32
Concurrent communication
diagram
• An active object can be used to
depict a concurrent object, process,
thread, or task.
• Depicted by a rectangular box with
two vertical parallel lines on the left-
and right-hand sides.
• An active object has its own thread
of control and executes concurrently
with other objects.
• A passive object has no thread of
control and executes only when
another object (active or passive)
invokes one of its operations.
• Depicted by a rectangular box
CT015-3-2 Design Methods Object Oriented Analysis and Modelling Part 1 Slide <20> of 32
Concurrent communication
diagram
• Message send between tasks are either asynchronous (loosely
coupled) or synchronous (tightly coupled).
CT015-3-2 Design Methods Object Oriented Analysis and Modelling Part 1 Slide <21> of 32
Concurrent communication
diagram
CT015-3-2 Design Methods Object Oriented Analysis and Modelling Part 1 Slide <22> of 32
Deployment diagrams
• A deployment diagram shows
the physical configuration of the
system in terms of physical nodes
and physical connections
between the nodes, such as
network connections.
• A node is shown as a cube, and
the connection is shown as a line
joining the nodes.
• A deployment diagram is
essentially a class diagram that
focuses on the system’s nodes
CT015-3-2 Design Methods Object Oriented Analysis and Modelling Part 1 Slide <23> of 32
UML Extension Mechanism
CT015-3-2 Design Methods Object Oriented Analysis and Modelling Part 1 Slide <24> of 32
UML Extension Mechanism :
stereotypes
• defines a new building block that is
derived from an existing UML modeling
element but tailored to the modeler’s
problem
CT015-3-2 Design Methods Object Oriented Analysis and Modelling Part 1 Slide <25> of 32
UML Extension Mechanism :
Tagged values
• A tagged value extends the properties of a UML building
block thereby adding new information.
• A tagged value is enclosed in braces in the form {tag =
value}.
• Commas separate additional tagged values.
• For example, a class may be depicted with the tagged
values {version = 1.0, author = Gill}
CT015-3-2 Design Methods Object Oriented Analysis and Modelling Part 1 Slide <26> of 32
UML Extension Mechanism :
Constraints
• A constraint specifies a condition that
must be true.
• In UML, a constraint is an extension of the
semantics of a UML element to allow the
addition of new rules or modifications to
existing rules
CT015-3-2 Design Methods Object Oriented Analysis and Modelling Part 1 Slide <27> of 32
UML as a Standard
UML 2.0
(2004)
CT015-3-2 Design Methods Object Oriented Analysis and Modelling Part 1 Slide <28> of 32
Quick & Review Question
CT015-3-2 Design Methods Object Oriented Analysis and Modelling Part 1 Slide <29> of 32
Summary of Teaching points
CT015-3-2 Design Methods Object Oriented Analysis and Modelling Part 1 Slide <30> of 32
Q&A
CT015-3-2 Design Methods Object Oriented Analysis and Modelling Part 1 Slide <31> of 32
What We Will Cover Next
CT015-3-2 Design Methods Object Oriented Analysis and Modelling Part 1 Slide <32> of 32
Design Methods
CT015-3-2 Version 1
CT015-3-2 Design Methods Object Oriented Analysis and Modelling Part 1 Slide <#> of 24
Learning objectives
CT015-3-2 Design Methods Object Oriented Analysis and Modelling Part 1 Slide <#> of 24
Key Terms
• COMET
CT015-3-2 Design Methods Object Oriented Analysis and Modelling Part 1 Slide <#> of 24
COMET
(Collaborative Object Modeling
and Architectural Design Method)
CT015-3-2 Design Methods Object Oriented Analysis and Modelling Part 1 Slide <#> of 24
COMET
(Collaborative Object Modeling
and Architectural Design Method)
CT015-3-2 Design Methods Object Oriented Analysis and Modelling Part 1 Slide <#> of 24
COMET Phases:
Requirements modeling
• A requirements model is developed in which the functional
requirements of the system are described in terms of actors
and use cases.
• A narrative description of each use case is developed.
• In this phase, user inputs and active participation are
essential
• Throwaway prototypes can help to clarify the requirements.
CT015-3-2 Design Methods Object Oriented Analysis and Modelling Part 1 Slide <#> of 24
COMET Phases:
Analysis modeling
• The use case is realized, to describe the objects that participate in the
use case and their interactions
• Static and dynamic models of the system are developed.
– Static Models
• Defines the structural relationships among problem domain
classes which depicted on class diagrams. Object structuring
criteria are used to determine the objects to be considered for the
analysis model.
– Dynamic Models
• The use cases from the requirements model are realized to show
the objects that participate in each use case and how they interact
with each other which are depicted on either communication
diagrams or sequence diagrams. In the dynamic model, state-
dependent objects are defined using statecharts.
CT015-3-2 Design Methods Object Oriented Analysis and Modelling Part 1 Slide <#> of 24
COMET Phases:
Design modeling
• The software architecture is developed, describing
components and their interfaces
• The software architecture of the system is designed
in which the analysis model mapped to an operational
environment.
• The analysis model, with its emphasis on the problem
domain, is mapped to the design model
• Subsystem structuring criteria are provided to
structure the system into subsystems, which are
aggregate or composite objects.
CT015-3-2 Design Methods Object Oriented Analysis and Modelling Part 1 Slide <#> of 24
COMET Phases:
Design modeling
• For sequential systems: the emphasis is on the object-
oriented concepts of information hiding, classes, and
inheritance.
• For concurrent systems: such as real-time, client/server,
and distributed applications, it is necessary to consider
concurrent tasking concepts in addition to object-oriented
concepts.
CT015-3-2 Design Methods Object Oriented Analysis and Modelling Part 1 Slide <#> of 24
COMET Phases:
Incremental Software Construction
• The software subsystems are incrementally constructed and
integrated into incremental prototypes.
• Select subset of system based on use cases
• This phase consists of:-
- detailed design
- coding
- unit testing
• Gradually constructed and integrated until the whole system
is built.
CT015-3-2 Design Methods Object Oriented Analysis and Modelling Part 1 Slide <#> of 24
COMET Phases:
Incremental Software Integration
• The integration testing of each software increment is
performed based on the use cases selected for the
increment.
• Integration testing is a form of white box testing, in which
the interfaces between the objects that participate in
each use case are tested.
• If significant problems are detected in the software
increment, iteration through the requirements modeling,
analysis modeling, and design modeling phases might
be necessary.
CT015-3-2 Design Methods Object Oriented Analysis and Modelling Part 1 Slide <#> of 24
COMET Phases:
System testing
• System testing includes the functional testing of
the system
- testing the system against its functional
requirements.
• This testing is black box testing and is based on
the black box use cases
• Any software increment released to the
customer needs to go through the system
testing phase.
CT015-3-2 Design Methods Object Oriented Analysis and Modelling Part 1 Slide <#> of 24
Comparison Of The Comet
Life Cycle With Other Software
Processes
CT015-3-2 Design Methods Object Oriented Analysis and Modelling Part 1 Slide <#> of 24
Unified Software Development
Process (USDP)
• Also known as RUP - trademark name for
IBM
• A use case–driven software process that
uses the UML notation.
• Consists of 5 workflows and 4 phases and
is iterative.
CT015-3-2 Design Methods Object Oriented Analysis and Modelling Part 1 Slide <#> of 24
USDP
CT015-3-2 Design Methods Object Oriented Analysis and Modelling Part 1 Slide <#> of 24
COMET vs USDP
CT015-3-2 Design Methods Object Oriented Analysis and Modelling Part 1 Slide <#> of 24
Spiral
CT015-3-2 Design Methods Object Oriented Analysis and Modelling Part 1 Slide <#> of 24
Spiral
CT015-3-2 Design Methods Object Oriented Analysis and Modelling Part 1 Slide <#> of 24
COMET vs Spiral
• The COMET method can also be used with the spiral model
when project manager decides what specific technical activity
should be performed in the third quadrant.
(I) Quadrant : Objective identification
(II) Quadrant : Risk analysis
(III) Quadrant : Product development
- Requirement Modeling
- Analysis Modeling
- Design Modeling
(IV) Quadrant : Cycle planning
CT015-3-2 Design Methods Object Oriented Analysis and Modelling Part 1 Slide <#> of 24
Quick & Review Question
• What is COMET?
• List all the phases in COMET.
• Explain the difference between USDP and
COMET life cycle?
CT015-3-2 Design Methods Object Oriented Analysis and Modelling Part 1 Slide <#> of 24
Summary of Teaching points
CT015-3-2 Design Methods Object Oriented Analysis and Modelling Part 1 Slide <#> of 24
Q&A
CT015-3-2 Design Methods Object Oriented Analysis and Modelling Part 1 Slide <#> of 24
What We Will Cover Next
CT015-3-2 Design Methods Object Oriented Analysis and Modelling Part 1 Slide <#> of 24
Design Methods
CT015-3-2 Version 1
• Activities in COMET
CT015-3-2 Design Methods Object Oriented Analysis and Modelling Part 1 Slide <2> of 21
Learning objectives
CT015-3-2 Design Methods Object Oriented Analysis and Modelling Part 1 Slide <2> of 21
Key Terms
CT015-3-2 Design Methods Object Oriented Analysis and Modelling Part 1 Slide <2> of 21
Modeling Activities in COMET
CT015-3-2 Design Methods Object Oriented Analysis and Modelling Part 1 Slide <2> of 21
Activities in Requirements Modeling
CT015-3-2 Design Methods Object Oriented Analysis and Modelling Part 1 Slide <2> of 21
Activities in Analysis Modeling
CT015-3-2 Design Methods Object Oriented Analysis and Modelling Part 1 Slide <2> of 21
Activities in Analysis Modeling
CT015-3-2 Design Methods Object Oriented Analysis and Modelling Part 1 Slide <2> of 21
Activities in Analysis Modeling :
Static Modeling
• Define problem-specific static model*
– Structural view
• Classes defined in terms of attributes
– Emphasis on info modeling of real-world classes
in the problem domain
• Relationships between classes defined
CT015-3-2 Design Methods Object Oriented Analysis and Modelling Part 1 Slide <2> of 21
Activities in Analysis Modeling :
Dynamic Interaction Modeling
CT015-3-2 Design Methods Object Oriented Analysis and Modelling Part 1 Slide <2> of 21
Activities in Analysis Modeling :
Dynamic State Machine
Modeling
• State-dependent system properties
defined
– Using hierarchical state-charts
– Each state-dependent object determined is
defined in terms of its constituent statechart
CT015-3-2 Design Methods Object Oriented Analysis and Modelling Part 1 Slide <2> of 21
Activities in Design Modeling
CT015-3-2 Design Methods Object Oriented Analysis and Modelling Part 1 Slide <2> of 21
Subsystem Structure Example
CT015-3-2 Design Methods Object Oriented Analysis and Modelling Part 1 Slide <2> of 21
Software Architectural and
Design Patterns Example
CT015-3-2 Design Methods Object Oriented Analysis and Modelling Part 1 Slide <2> of 21
Activities in Design Modeling
CT015-3-2 Design Methods Object Oriented Analysis and Modelling Part 1 Slide <2> of 21
Activities in Design Modeling
CT015-3-2 Design Methods Object Oriented Analysis and Modelling Part 1 Slide <2> of 21
Quick & Review Question
CT015-3-2 Design Methods Object Oriented Analysis and Modelling Part 1 Slide <2> of 21
Summary of Teaching points
CT015-3-2 Design Methods Object Oriented Analysis and Modelling Part 1 Slide <2> of 21
Q&A
CT015-3-2 Design Methods Object Oriented Analysis and Modelling Part 1 Slide <2> of 21
What We Will Cover Next
CT015-3-2 Design Methods Object Oriented Analysis and Modelling Part 1 Slide <2> of 21
Design Methods
CT015-3-2 Version 1
• Association
• Actor
• System Boundary
• System Boundary
– The use cases of the system are placed inside the system
shape, while the actor who interact with the system are put
outside the system.
– The use cases in the system make up the total requirements of
the system System Name
• Use Case
– represents a user goal that can be achieved by accessing the
system or software application
– Use case naming is based on “verb + noun”
– Example: Check Balance
Check Balance
• Actor
– Are the entities that interact with a system
– Usually used to represent the users of system
– Actor represents a role that a user can play but not a specific
user
• Association
– Actor and use case can be associated to indicate that the actor
participates in that use case
– A single line without any arrowhead
• Generalization
– Used to represent inheritance relationship between model
elements of same type
– A single line with blank arrowhead
• Include
– The behavior for the inclusion use case is inserted into the
behavior defined for the base use case
– The child use case must be completed before parent use case
can be executed
– included use case cannot stand alone and the original use case
is not complete without the included one
• No need Include
– A customer can make an order and payment using the system.
• Need Include
– A customer can only make a payment once the order is placed
using the system.
• Extend
– A use case conditionally adds steps to another first class use
case
– Base use case is complete (concrete) by itself, defined
independently
– Extending use case is optional, supplementary
• No need Extend
– In a system user can make registration or look for help if need
guide to make a registration.
• Need Extend
– In a system user can make registration and able to seek for help
during the registration before complete the process.
CT015-3-2 Design Methods Object Oriented Analysis and Modelling Part 1 Slide <2> of 14
Learning objectives
CT015-3-2 Design Methods Object Oriented Analysis and Modelling Part 1 Slide <3> of 14
Key Terms
• Dependency
• Pre-condition
• Post-condition
CT015-3-2 Design Methods Object Oriented Analysis and Modelling Part 1 Slide <4> of 14
Use Case Description
CT015-3-2 Design Methods Object Oriented Analysis and Modelling Part 1 Slide <5> of 14
Templates for a Use Case
Specifications
Components Description
Use case Each use case is given a name
Description A brief description of the use case
Actors Names the actors in the use case. Generally, primary
actor that initiates the use case. In addition, there may be
secondary actors that also participate in the use case
Preconditions/ One or more conditions that must be true at the start of
Dependency use case, from the perspective of this use case
Postconditions Condition that is always true at the end of the use case
(from the perspective of this use case) if the main
sequence has been followed; for example, customer’s
funds have been withdrawn
<<include>>
View Login
profile
CT015-3-2 Design Methods Object Oriented Analysis and Modelling Part 1 Slide <6> of 14
Templates for a Use Case
Specifications
Components Description
Standard Process A series of declarative steps - sequence of interactions
between the actor and the system. The description is in
the form of the input from the actor, followed by the
response of the system
Alternative Narrative description of alternative branches off the main
Process sequence – to complete standard process
Exception Process There may be several alternative branches from the main
sequence – to handle error in standard process
CT015-3-2 Design Methods Object Oriented Analysis and Modelling Part 1 Slide <6> of 14
Sample of Use Case Description
CT015-3-2 Design Methods Object Oriented Analysis and Modelling Part 1 Slide <9> of 14
Sample of Use Case Description
Exception Flow Step 2a: Not login into account / Invalid account
2a.1- The system prompts customer request to login or create an
account
2a.2- The flow continue from step 1
CT015-3-2 Design Methods Object Oriented Analysis and Modelling Part 1 Slide <10> of 14
Quick & Review Question
• Explain flows-of-event.
• Defines preconditions.
CT015-3-2 Design Methods Object Oriented Analysis and Modelling Part 1 Slide <11> of 14
Summary of Teaching points
CT015-3-2 Design Methods Object Oriented Analysis and Modelling Part 1 Slide <12> of 14
Q&A
CT015-3-2 Design Methods Object Oriented Analysis and Modelling Part 1 Slide <13> of 14
What We Will Cover Next
CT015-3-2 Design Methods Object Oriented Analysis and Modelling Part 1 Slide <14> of 14
Design Methods
CT015-3-2 Version 1
CT015-3-2 Design Methods Object Oriented Analysis and Modelling Part 1 ‹#›
Elements in Activity Diagram
Elements Notation Explanation
Initial Node Indicates the first action
or actions in the activity.
Example:
Example:
Example:
Example:
Example:
Example:
Example:
Example:
Example:
Example:
Example:
o
f
1
4
o
f
1
4
Q&A
o
f
1
4
• Static Modeling
Static Modelling
Topics and Structure of the Lesson
• Static Modeling
-Notations
-Relationships
CT015-3-2 Design Methods Object Oriented Analysis and Modelling Part 1 Slide <2> of 26
Learning objectives
• Object
• Associations
• Composition / Aggregation
• Generalization / Specialization
CT015-3-2 Design Methods Object Oriented Analysis and Modelling Part 1 Slide <4> of 26
Static Modelling
• Describes static structure of the system being
modeled, which is considered less likely to change
than the functions of the system
• The UML class diagram notation is used to depict
static model
• In OO Analysis Modelling
– Define classes in system
– Defines attributes of classes
– Defines relationships between classes
• In OO Design Modelling
– Defines operations of each class
CT015-3-2 Design Methods Object Oriented Analysis and Modelling Part 1 Slide <5> of 26
Object and Classes
CT015-3-2 Design Methods Object Oriented Analysis and Modelling Part 1 Slide <7> of 26
UML notation for objects &
classes
CT015-3-2 Design Methods Object Oriented Analysis and Modelling Part 1 Slide <8> of 26
Modeling with class diagrams
CT015-3-2 Design Methods Object Oriented Analysis and Modelling Part 1 Slide <9> of 26
Relationship on Class Diagram
CT015-3-2 Design Methods Object Oriented Analysis and Modelling Part 1 Slide <10> of 26
Relationship on Class Diagram
CT015-3-2 Design Methods Object Oriented Analysis and Modelling Part 1 Slide <11> of 26
Association
• Association is
– Static, structural relationship between classes
– E.g, Employee works in Department
• Navigability can be unidirectional or
bidirectional
• Multiplicity of Associations
– Specifies how many instances of one class may
CT015-3-2 Design Methods Object Oriented Analysis and Modelling Part 1 Slide <13> of 26
Multiplicity of Association
• 1-to-1 association
– Company has President
• 1-to-many association
– Bank manages Account
• Numerically specified association
– Car has 2,4 Door
• Optional association (0 or 1)
– Customer owns Debit Card
• Optional association (0, 1, or many)
– Customer owns Credit Card
• Many-to-Many association
– Course has Student
– Student attends Course
CT015-3-2 Design Methods Object Oriented Analysis and Modelling Part 1 Slide <14> of 26
Aggregation
• Aggregation
– Part objects of aggregate object may be created
and deleted independently of aggregate
object.
– it is binary association
– symbolized by a clear white diamond
– “is part of”
CT015-3-2 Design Methods Object Oriented Analysis and Modelling Part 1 ‹#›
• A car needs a wheel to function correctly, but a wheel
doesn’t always need a car. It can also be used with the
bike, bicycle, or any other vehicles but not a particular
car. Here, the wheel object is meaningful even without
the car object. Such type of relationship is called UML
Aggregation relation.
CT015-3-2 Design Methods Object Oriented Analysis and Modelling Part 1 Slide <#> of 26
Composition
CT015-3-2 Design Methods Object Oriented Analysis and Modelling Part 1 ‹#›
• The folder could contain many files, while
each File has exactly one Folder parent. If
a folder is deleted, all contained files are
removed as well.
CT015-3-2 Design Methods Object Oriented Analysis and Modelling Part 1 Slide <#> of 26
Generalization
CT015-3-2 Design Methods Object Oriented Analysis and Modelling Part 1 Slide <19> of 26
Dependency
• A dependency relationship describes a case
where one class uses another
• Dependencies may exist between classes
because:
– A message is sent from one class to the other
– One class is part of another's data
– One mentions the other as a parameter to an
operation
CT015-3-2 Design Methods Object Oriented Analysis and Modelling Part 1 Slide <21> of 26
Realization
CT015-3-2 Design Methods Object Oriented Analysis and Modelling Part 1 Slide <22> of 26
Class Diagram Example
CT015-3-2 Design Methods Object Oriented Analysis and Modelling Part 1 Slide ‹#› of 9
Quick & Review Question
CT015-3-2 Design Methods Object Oriented Analysis and Modelling Part 1 Slide <23> of 26
Summary of Teaching points
• Static Modeling
-Notations
-Relationships
CT015-3-2 Design Methods Object Oriented Analysis and Modelling Part 1 Slide <24> of 26
Q&A
CT015-3-2 Design Methods Object Oriented Analysis and Modelling Part 1 Slide <25> of 26
What We Will Cover Next
CT015-3-2 Design Methods Object Oriented Analysis and Modelling Part 1 Slide <26> of 26
OBJECT ORIENTED METHODS
CE52604-5
Student
Student +EnrollModule()
Class Diagram
ERD
Hint:
(i) Classes are nouns
(ii) Just identify the ones that are obvious to you. You
may identify more later.
Candidate Classes:
Student
Book
Booking
Payment
Hint:
(i) Each identified class in step (i) becomes a CRC
with the same name.
Hint:
(i) Collaborators are identified classes – i.e student,
book, etc.
(ii) There could be one responsibility having two
collaborators and vice versa.
(iii) It is possible to have a responsibility with NO
collaborators.
(iv) Each responsibilities should ideally be expressed in
a few words (usually not more than 4) and must
begin with a verb.
CT015-3-2 Design Methods Object Oriented Analysis and Modelling Part 1
Creating Class Diagram
Step 3 (continued)
Hint:
(i) Each CRC becomes a class of its own.
(ii) A CRC having two or more collaborators would
mean having similarly two or more connected
classes.
(iii) Responsibility of a CRC would turn out to be
methods of the class
(iv) Methods usually begin with a verb – i.e
generateReport().
Inventory System
CT015-3-2 Design Methods Object Oriented Analysis and Modelling Part 1 Slide <2> of 30
Learning objectives
CT015-3-2 Design Methods Object Oriented Analysis and Modelling Part 1 Slide <3> of 30
Key Terms
• Entity object
• Boundary object
• Control object
• Application logic object
CT015-3-2 Design Methods Object Oriented Analysis and Modelling Part 1 Slide <4> of 30
Object and Class Structuring
CT015-3-2 Design Methods Object Oriented Analysis and Modelling Part 1 Slide <5> of 30
Object and Class Structuring
Criteria
CT015-3-2 Design Methods Object Oriented Analysis and Modelling Part 1 Slide <6> of 30
Object and Class Structuring
Categories
• The four main categories :
1. Entity object
– represents the class where the data to be saved to or
retrieved from.
2. Boundary object
– Software object that interfaces to and communicates
with the external environment
Device Interface Objects connect to a hardware I/O device.
User Interface Objects provide for human user interaction.
System Interface Objects represent external systems or
subsystems.
CT015-3-2 Design Methods Object Oriented Analysis and Modelling Part 1 Slide <7> of 30
Object and Class Structuring
Categories
3. Control object
– Software object that provides the overall coordination
for a collection of objects. Control objects may be
coordinator objects, state-dependent control
objects, or timer objects.
4. Application logic object
– Software object that contains the details of the
application logic. Another category is service objects,
which provide services for client objects, typically in
service-oriented architectures and applications.
CT015-3-2 Design Methods Object Oriented Analysis and Modelling Part 1 Slide <8> of 30
Classification of application
classes by stereotype
CT015-3-2 Design Methods Object Oriented Analysis and Modelling Part 1 Slide <9> of 30
Boundary Object
CT015-3-2 Design Methods Object Oriented Analysis and Modelling Part 1 Slide <11> of 30
Boundary : Proxy
• Interfaces to an external system
– Interfaces to an
external system
– Hides details of how
to communicate with
external system
• E.g., Robot Proxy
• Interfaces to external (real-
world) robot
CT015-3-2 Design Methods Object Oriented Analysis and Modelling Part 1 Slide <12> of 30
Boundary : Device I/O
• Interfaces to I/O device
• Input object
– E.g., Sensor
Interface
• Output object
– E.g., Actuator
Interface
• I/O (Input/Output) object
– E.g., ATM Card
Reader Interface
CT015-3-2 Design Methods Object Oriented Analysis and Modelling Part 1 Slide <13> of 30
Device I/O boundary object
CT015-3-2 Design Methods Object Oriented Analysis and Modelling Part 1 Slide <14> of 30
Depicting External Classes and
Boundary Classes
CT015-3-2 Design Methods Object Oriented Analysis and Modelling Part 1 Slide <15> of 30
Entity Classes and Objects
CT015-3-2 Design Methods Object Oriented Analysis and Modelling Part 1 Slide <16> of 30
Entity Classes and Objects
CT015-3-2 Design Methods Object Oriented Analysis and Modelling Part 1 Slide <17> of 30
Control Classes and Objects
CT015-3-2 Design Methods Object Oriented Analysis and Modelling Part 1 Slide <18> of 30
Control Classes and Objects
• Control Objects:
– Coordinator object
Overall decision-making object that determines the
overall sequencing for a collection of related objects.
– State dependent control object
Defined by finite state machine - depicted by using a
statechart.
– Timer object
A control object that is activated by an external timer –
e.g, a real-time clock or operating system clock.
CT015-3-2 Design Methods Object Oriented Analysis and Modelling Part 1 Slide <19> of 30
Control :Coordinator object
Example of
coordinator class
and object
CT015-3-2 Design Methods Object Oriented Analysis and Modelling Part 1 Slide <20> of 30
Control : state-dependent
Example of
state-dependent
control class and
object
CT015-3-2 Design Methods Object Oriented Analysis and Modelling Part 1 Slide <21> of 30
Control : Tmer
Example of a
timer class and
object
CT015-3-2 Design Methods Object Oriented Analysis and Modelling Part 1 Slide <22> of 30
Application Logic Classes and
Objects
• 3 kinds of application logic objects:
– Business Logic Object
Defines business specific application logic (rules) for
processing a client request. Usually accesses more
than one entity object
– Algorithm Object
Encapsulates algorithm used in problem domain. More
usual in scientific, engineering, real-time domains
– Service object
Provides a service to other objects and responds to
requests from client objects
CT015-3-2 Design Methods Object Oriented Analysis and Modelling Part 1 Slide <23> of 30
Application Logic : business logic
Example of
business logic
class and object
CT015-3-2 Design Methods Object Oriented Analysis and Modelling Part 1 Slide <24> of 30
Application Logic : algorithm
Example of
algorithm class
and object
CT015-3-2 Design Methods Object Oriented Analysis and Modelling Part 1 Slide <25> of 30
Application Logic: service
Example of service
class and object
CT015-3-2 Design Methods Object Oriented Analysis and Modelling Part 1 Slide <26> of 30
Quick & Review Question
CT015-3-2 Design Methods Object Oriented Analysis and Modelling Part 1 Slide <27> of 30
Summary of Teaching points
CT015-3-2 Design Methods Object Oriented Analysis and Modelling Part 1 Slide <28> of 30
Q&A
CT015-3-2 Design Methods Object Oriented Analysis and Modelling Part 1 Slide <29> of 30
What We Will Cover Next
• Interaction Modeling
CT015-3-2 Design Methods Object Oriented Analysis and Modelling Part 1 Slide <30> of 30
Design Methods
CT015-3-2 Version 1
Interaction Modelling
Topics and Structure of the Lesson
• Interaction Modeling
-Types
-Notations
-Relationships
CT015-3-2 Design Methods Object Oriented Analysis and Modelling Part 1 Slide <2> of 23
Learning objectives
CT015-3-2 Design Methods Object Oriented Analysis and Modelling Part 1 Slide <3> of 23
Key Terms
• Communication diagram
• Sequence diagram
CT015-3-2 Design Methods Object Oriented Analysis and Modelling Part 1 Slide <4> of 23
Dynamic Modelling
• Determine how objects interact with each other to
support use case:
– Start with external event from actor
– Determine objects needed to support
use case
– Determine sequence of internal events
following external event
– Depict on communication diagram or
sequence diagram
CT015-3-2 Design Methods Object Oriented Analysis and Modelling Part 1 Slide <5> of 23
Communication Diagram
CT015-3-2 Design Methods Object Oriented Analysis and Modelling Part 1 Slide <6> of 23
Sequence Diagram
CT015-3-2 Design Methods Object Oriented Analysis and Modelling Part 1 Slide <8> of 23
Message Sequence Description
• Describes sequence of object interactions
– Narrative description
– Corresponds to Communication Diagram or Sequence
Diagram
• Description corresponds to message sequence
numbering on diagrams
– Describe what object does on receiving message
• E.g., every time an object interacts with an entity object
– Describe the object being accessed
– Identify attributes referenced
CT015-3-2 Design Methods Object Oriented Analysis and Modelling Part 1 Slide <10> of 23
Use Case Specification
Use case UC1_Make Order Request
Description This use case is used to help customer to make an order on the
products they have selected. The purchase can only be made via
credit card.
Actors Customer
Preconditions/ One product at least must be selected by customer to start make
Dependency an order.
Postconditions Delivery order has successfully created.
Standard Process 1- Customer provides order detail
2- System checks customer information
3- System retrieves customer payment information record
4- System checks customer credit card for purchase amount, if
approves, creates credit card purchase
5- Customer confirm the order
6- System create delivery order with order details and customer
details
7- System display success order and display order information to
customer
CT015-3-2 Design Methods Object Oriented Analysis and Modelling Part 1 Slide <11> of 23
Use Case Specification
Exception Flow Step 2a: Not login into account / Invalid account
2a.1- The system prompts customer request to login or create an
account
2a.2- The flow continue from step 1
CT015-3-2 Design Methods Object Oriented Analysis and Modelling Part 1 Slide <11> of 23
Message Sequence Description
for Make Order Request
• 1: Customer provides order detail
• 2: System checks customer information
• 3: System retrieves customer payment information
record
• 4: System checks customer credit card for purchase
amount, if approves, creates credit card purchase
• 5: Customer confirm the order
• 6: System create delivery order with order details and
customer details
• 7: System display success order and display order
information to customer
CT015-3-2 Design Methods Object Oriented Analysis and Modelling Part 1 Slide <11> of 23
Communication Diagram
CT015-3-2 Design Methods Object Oriented Analysis and Modelling Part 1 Slide <7> of 23
Communication Diagram
• Make Order Request use case
CT015-3-2 Design Methods Object Oriented Analysis and Modelling Part 1 Slide <7> of 23
Sequence Diagram
• Make Order Request use case
CT015-3-2 Design Methods Object Oriented Analysis and Modelling Part 1 Slide <9> of 23
Combined Fragments
CT015-3-2 Design Methods Object Oriented Analysis and Modelling Part 1 Slide <12> of 23
Combined Fragments
Fragment type Description
Opt Optional. Encloses a sequence that might or might not happen. You can specify, in the
guard, the condition under which it occurs.
Alt Contains a list of fragments that contain alternative sequences of messages. Only one
sequence occurs on any occasion.
You can put a guard in each fragment to indicate under what condition it can run. A guard
of else indicates a fragment that should run if no other guard is true. If all guards are false
and there is no else, then none of the fragments executes.
Loop The fragment repeats some number of times. You can indicate in the guard the condition
under which it should repeat.
Loop combined fragments have the properties Min and Max, which indicate the minimum
and maximum number of times that the fragment can be repeated. The default is no
restriction.
Ref Interaction use is interaction fragment which allows to use (or call) another interaction.
Large and complex sequence diagrams could be simplified with interaction uses. It is also
common reusing some interaction between several other interactions.
CT015-3-2 Design Methods Object Oriented Analysis and Modelling Part 1 Slide <13> of 23
Combined Fragments
Alternative
fragment
box Optional
fragment
box
Interaction use
Loop/iterative / reference
fragment box fragment box
CT015-3-2 Design Methods Object Oriented Analysis and Modelling Part 1 Slide <14> of 23
Sequence Diagram
• Make Order
Request use
case
CT015-3-2 Design Methods Object Oriented Analysis and Modelling Part 1 Slide <15> of 23
Sequence versus Communication
Diagram
CT015-3-2 Design Methods Object Oriented Analysis and Modelling Part 1 Slide <19> of 23
Quick & Review Question
CT015-3-2 Design Methods Object Oriented Analysis and Modelling Part 1 Slide <20> of 23
Summary of Teaching points
• Interaction Modeling
-Types
-Notations
-Relationships
CT015-3-2 Design Methods Object Oriented Analysis and Modelling Part 1 Slide <21> of 23
Exercise
Use case UC2_Delete Order
Description This use case is used to help admin to delete an order on the products they
have selected. The delete feature can only be access in admin panel.
Actors Admin
Preconditions/ One product at least must be selected by customer to start make an order.
Dependency
Postconditions Order has successfully deleted.
Standard Process 1- System display list of order
2- Admin select Order, and click delete
3- System request for confirmation
4- Admin confirm the deletion process
6- System delete the order in database
7- System display success deleted order
Alternative None
CT015-3-2 Design Methods Object Oriented Analysis and Modelling Part 1 Slide <23> of 23
Q&A
CT015-3-2 Design Methods Object Oriented Analysis and Modelling Part 1 Slide <22> of 23
What We Will Cover Next
CT015-3-2 Design Methods Object Oriented Analysis and Modelling Part 1 Slide <23> of 23
Design Methods
CT015-3-2 Version 1
• State
• Orthogonal
Updating
Waiting for Approval
Appointment
Creating Cancelling
Appointment Appointment
Viewing Appointment
List
CT015-3-2 Design Methods Object Oriented Analysis and Modelling Part 1 Slide ‹#› of 20
State Actions
CT015-3-2 Design Methods Object Oriented Analysis and Modelling Part 1 Slide ‹#› of 20
Transitions
• State transitions:
Possible paths the
system may take from
one state to another
• Triggering events:
Instantaneous events that
stimulate state transitions
Viewing Appointment
List Trigger event or action
Applying
Appointment
CT015-3-2 Design Methods Object Oriented Analysis and Modelling Part 1 Slide ‹#› of 20
Orthogonal States
Display
Current
Time
are fired
• If all guard conditions return false, then remain in the source
CT015-3-2 Design Methods Object Oriented Analysis and Modelling Part 1 Slide ‹308› of 20
Learning Outcomes
CT015-3-2 Design Methods Object Oriented Analysis and Modelling Part 1 Slide ‹309› of 20
Lecture Content
CT015-3-2 Design Methods Object Oriented Analysis and Modelling Part 1 Slide ‹310› of 20
Structure Diagrams
• Object Diagram,
• Component Diagram,
• Package Diagram,
• Deployment Diagram.
CT015-3-2 Design Methods Object Oriented Analysis and Modelling Part 1 Slide ‹5› of 20
Object Diagram
CT015-3-2 Design Methods Object Oriented Analysis and Modelling Part 1 Slide ‹7› of 20
Component Diagram
• Higher level of
abstraction than a
Class Diagram
• Component
diagram shows
components,
provided and
required
interfaces, ports,
and relationships
between them.
CT015-3-2 Design Methods Object Oriented Analysis and Modelling Part 1 Slide ‹8› of 20
Component Diagram
CT015-3-2 Design Methods Object Oriented Analysis and Modelling Part 1 Slide ‹315› of 20
Package Diagram
• Package diagram is UML structure diagram
which shows structure of the designed system at
the level of packages.
• Reflect the organization of packages and their
elements.
CT015-3-2 Design Methods Object Oriented Analysis and Modelling Part 1 Slide ‹316› of 20
Deployment Diagram
CT015-3-2 Design Methods Object Oriented Analysis and Modelling Part 1 Slide ‹317› of 20
Composite Structure Diagram
CT015-3-2 Design Methods Object Oriented Analysis and Modelling Part 1 Slide ‹318› of 20
Composite Structure Diagram
Overview shows
elements of
internal structure
of structured
classifier - roles,
parts, connectors.
CT015-3-2 Design Methods Object Oriented Analysis and Modelling Part 1 Slide ‹319› of 20
Interaction Diagrams
• Communication Diagram,
• Timing Diagram,
• Interaction Overview Diagram.
CT015-3-2 Design Methods Object Oriented Analysis and Modelling Part 1 Slide ‹320› of 20
Communication Diagram
CT015-3-2 Design Methods Object Oriented Analysis and Modelling Part 1 Slide ‹321› of 20
Timing Diagram
• Display the change
in state or value of
one or more
elements over time.
It can also show the
interaction between
timed events and the
time and duration
constraints that
govern them.
CT015-3-2 Design Methods Object Oriented Analysis and Modelling Part 1 Slide ‹322› of 20
Interaction Overview Diagram.
• A form of activity
diagram in which
the nodes represent
interaction
diagrams.
Interaction
diagrams can
include sequence,
communication,
interaction overview
and timing diagrams
• Higher level view
CT015-3-2 Design Methods Object Oriented Analysis and Modelling Part 1 Slide ‹323› of 20
Reading
CT015-3-2 Design Methods Object Oriented Analysis and Modelling Part 1 Slide ‹325› of 20
Question and Answer Session
Q&A
CT015-3-2 Design Methods Object Oriented Analysis and Modelling Part 1 Slide ‹326› of 20