0% found this document useful (0 votes)
5 views

Ch08 - Object and Class Structuring

Uploaded by

dangvietgttn01
Copyright
© © All Rights Reserved
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
5 views

Ch08 - Object and Class Structuring

Uploaded by

dangvietgttn01
Copyright
© © All Rights Reserved
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 18

SOFTWARE DESIGN (SWD392)

CH08 - OBJECT AND CLASS STRUCTURING


Main Contents
• Overview
• External Classes & Software Boundary Classes
• Entity Classes & Objects
• Control Classes & Objects
• Application Logic Classes & Objects

2 / 18
Overview
• Requirement modeling is to understand
the problem domain
– Use case modeling: actors, UCs, UC diagrams
– Static modeling: class/object relationships, system
context class diagrams, software context class
diagrams, entity class models
• Object and Class Structuring are to determine
the software objects in the system
– The emphasis is on software objects that model real-
world objects in the problem domain
– The application classes are categorized in order to
group together classes with similar characteristics
3 / 18
Overview
Object & Class Structuring Categories 1/3

4 / 18
Overview
Object & Class Structuring Categories 2/3

5 / 18
Overview
Object & Class Structuring Categories 3/3

Application logic object. Software object that contains the


details of the application logic. Needed when it is desirable
to hide the application logic separately from the data
being manipulated because it is considered likely that the
application logic could change independently of the data.
• For information systems, application logic objects are
usually business logic objects
• For real-time, scientific, or engineering applications,
they are usually algorithm objects.
• Another category is service objects, which provide
services for client objects, typically in service-oriented
architectures and applications

6 / 18
External Classes
& Software Boundary Classes

User Interaction Objects


• A user interaction object communicates directly with the human user,
receiving input from the user and providing output to the user via
standard I/O devices such as the keyboard, visual display, and mouse.
• Depending on the user interface technology, the user interface could
be very simple (such as a command line interface) or it could be more
complex (such as a graphical user interface [GUI] object).
7 / 18
Entity Classes & Objects
An entity object is a software object that stores
information.
• Entity objects are instances of entity classes, whose
attributes and relationships with other entity classes
are determined during static modeling
• Entity objects store data and provide limited access
to that data via the operations they provide.

8 / 18
Control Classes & Objects
A control object provides the overall coordination of
the objects that realize a use case.
Simple use cases do not need control objects.
However, in a more complex use case, a control object
is usually needed.
A control object is analogous to the conductor of an
orchestra, who orchestrates (controls) the behavior of
the other objects that participate in the use case,
notifying each object when and what it should
perform.

9 / 18
Control Classes & Objects
Categories of Control Objects
Depending on the
characteristics of the use case,
the control object may be
state-dependent or timer
objects
• A state-dependent control object is a control object
whose behavior varies in each of its states
• A timer object is a control object that is activated by
an external timer – for example, a real-time clock or
operating system clock. The timer object either
performs some action itself or activates another
object to perform the desired action

10 / 18
Control Classes & Objects
State-dependent Control Object
A state-dependent control
object receives incoming
events that cause state
transitions and generates
output events that control
other objects.
• The output event generated by a state-dependent control object
depends not only on the input received by the object but also on
the current state of the object.
• Example: state-dependent control object ATM Control is defined
by means of the ATM Control state-chart. In the example, ATM
Control is shown controlling two other output boundary objects,
Receipt Printer Interface and Cash Dispenser Interface.
11 / 18
Application Logic Classes & Objects
Business Logic Objects 1/2

Defines the business-specific application logic


for processing a client request. The goal is to
• Encapsulate (hide) business rules that could
change independently of each other into
separate business logic objects.
• Separate the business rules from the entity
data that they operate on, because the
business rules can change independently of
the entity data.

12 / 18
Application Logic Classes & Objects
Business Logic Objects 2/2

13 / 18
Application Logic Classes & Objects
Algorithm Objects 1/2

An algorithm object encapsulates an algorithm


used in the problem domain. This kind of object
is more prevalent in real-time, scientific, and
engineering domains.
• Algorithm objects are used when there is a
substantial algorithm used in the problem
domain that can change independently of the
other objects
• Simple algorithms are usually operations of an
entity object that operate on the data
encapsulated in the entity
14 / 18
Application Logic Classes & Objects
Algorithm Objects 2/2

15 / 18
Application Logic Classes & Objects
Service Objects 1/2

A service object is an object that provides a service for


other objects. They are usually provided in service-
oriented architectures and applications.
• Client objects can request a service from the service object,
which the service object will respond to. A service object
never initiates a request; however, in response to a service
request it might seek the assistance of other service objects.
• Service objects play an important role in service-oriented
architectures, although they are used in other architectures as
well, such as client/server architectures and component-
based software architectures.
• A service object might encapsulate the data it needs to
service client requests or access another entity object(s) that
encapsulate the data
16 / 18
Application Logic Classes & Objects
Service Objects 2/2

17 / 18

You might also like