Professional Documents
Culture Documents
11/21/2023 1
I. Object and Class Structuring
11/21/2023 2
Lecture Outline
11/21/2023 3
Object and class Structuring Criteria
Determining the software objects is the next step after
defining the use cases and developing the static model.
But there is no one unique way to decompose a system into
objects
Because the decision is based on the analyst judgment
Whether objects are in the same class or in a different
class depends on the nature of the problem. Example:
cars, vans and trucks
In automobile catalog – (object in the same class)
For vehicle manufacturer – (object of different class)
11/21/2023 4
Object and class Structuring Criteria
Object and class structuring criteria are provided to assist the
designer in structuring a system into objects.
Look for real-world objects in the problem domain and then
design corresponding software objects.
11/21/2023 5
Modeling Application Classes and Objects
11/21/2023 7
Object and class Structuring Categories
Most applications will have objects from each of the four
categories.
However, different types of applications will have a
greater number of classes in one or other category.
11/21/2023 8
Object and class Structuring Categories
The four main objects and classes categories:
1. Entity Objects: encapsulates information and provides access
to the information it stores
2. Boundary Objects: interfaces to and communicates with the
external environment
User interaction objects: object that interacts with and interfaces
to a human user
Proxy objects: object that interfaces to and communicates with an
external system or subsystem
Device I/O objects: object that receives input from and/or outputs
to a hardware I/O device
11/21/2023 9
Object and class Structuring Categories
The four main objects and classes categories (Cont..)
3. Control Objects: object that provides the overall coordination
for a collection of objects (reading assignment: read the following
types of control objects)
Coordinator objects: overall decision maker of all related objects
State-dependent objects: object whose behaviour varies in each of
its states.
Timer objects:
4. Application logic Objects: object that contains the details of the
application logic.
To hide the application logic separately from the data
It can be business logic, algorithm and service.
11/21/2023 10
Object and class Structuring Categories
In most cases, what category an object fits into is usually
obvious.
However, in some cases, it is possible for an object to
satisfy more than one of the aforementioned criteria.
11/21/2023 11
External Class and Software Boundary Classes
External classes are classes that are outside the software
system and that interface to the system.
Boundary classes are classes inside the system that
interface to and communicate with the external classes.
Consider the external classes to determine the boundary
classes.
Each of the external classes communicates with a boundary
class.
There is usually a one-to-one association between the
external class and the internal boundary class.
11/21/2023 12
External Class and Software Boundary Classes
External classes interface to software boundary classes as
follows:
11/21/2023 13
Boundary Classes and Objects
11/21/2023 14
User Interaction Objects
Communicates directly with the human user.
Receiving input from the user and providing output to the
user via standard I/O devices.
11/21/2023 22
Control Classes and Objects
Usually a business logic object accesses various entity objects during its
execution.
If the business rule can be executed by accessing two or more entity objects,
there should be a separate business logic object.
11/21/2023 26
Application Logic Classes and Objects
11/21/2023 28
Application Logic Classes and Objects
11/21/2023 30
Application Logic Classes and Objects
11/21/2023 32
Lecture Outline
Overview of object interaction modeling
Communication diagrams
Sequence diagrams
Describes message sequence numbering on interaction
diagrams
Introduces dynamic interaction modeling
Describe stateless dynamic interaction modeling
Examples of dynamic interaction modeling
11/21/2023 33
Object Interaction Modeling
A communication diagram is an interaction diagram that
depicts a dynamic view of a group of objects interacting
with each other by showing the sequence of messages
passed among them.
A communication diagram is developed for each use case
Only objects that participate in the use case are depicted
11/21/2023 34
Object Interaction Modeling
11/21/2023 Use case diagram for the View Alarms use case 35
Object Interaction Modeling
11/21/2023 37
Object Interaction Modeling
During design:
The type operations
Kind of message passed between objects
Object type
11/21/2023 39
Sequence Diagram Vs Communication Diagram
Sequence diagrams:
Clearly shows the order of the messages
Indicating the objects connection is more difficult
Iterations and decision statements can obscure
Communication diagrams :
Shows the layout of the objects (connection)
Message sequence is less readily visible
11/21/2023 40
Massage Label on Interaction Diagram
A message label has the following syntax:
[sequence expression]: Message Name (argument list)
Dynamic interaction modeling is carried out for each use
case.
Dynamic interaction modeling can be either state-
dependent or stateless.
11/21/2023 41
Stateless Dynamic Interaction Modeling
The main steps in the stateless dynamic interaction
modeling approach are:
Start with the use case
Consider the objects needed to realize the use case
Determine the sequence of message communication among
the objects
Two dynamic interaction modeling examples:
Use case for View Alarms
Use case for Process Delivery Order
11/21/2023 42
Example of Stateless Dynamic Interaction Modeling
11/21/2023 44
Example of Stateless Dynamic Interaction Modeling
11/21/2023 Use case diagram for the Make Order Request use case 47
Example of Stateless Dynamic Interaction Modeling
11/21/2023 48
Use case description
Example of Stateless Dynamic Interaction Modeling
11/21/2023 49
Example of Stateless Dynamic Interaction Modeling
11/21/2023 50
Example of Stateless Dynamic Interaction Modeling
The system confirms the order to the user (M9 and M10)
11/21/2023 51
Example of Stateless Dynamic Interaction Modeling
11/21/2023 55
Example of Stateless Dynamic Interaction Modeling
11/21/2023
Alternative message description 56
Example of Stateless Dynamic Interaction Modeling
11/21/2023 58
Example of Stateless Dynamic Interaction Modeling
?
11/21/2023 62