You are on page 1of 12

DETAILED CLASS
Dr. Hoang Huu Hanh, OST – Hue University
DESIGN
hanh-at-hueuni.edu.vn

Hue University

e University
Objectives
To describe the determining of
class’s operations.
To describe a template for class
interface specifications

e University
2
Designing Class
Operations
It is usually easy to determine
class’s operations from the
dynamic models of the systems, in
particular, from the interaction
diagrams.

When two objects interact, one
object provides an operation that
is used by the other object.
e University 
It is also necessary to consider 3
Example of Entity Class
 Analysismodel:  Design model:
collaboration collaboration
diagram diagram

e University
4
Example of
Output Device Interface Class








e University 
 Needs an initialize operation to initialize5
Example of
State Dependant Control
Class

Support two generic operations


e University ◦ processEvent
◦ currentState 6
Example of Business Logic
Class

e University
7
Further Categorization of
Entity Classes
During design, a decision has to
be made whether the data
encapsulated by an entity class
is to be managed directly by the
entity class or whether the data
is actually to be stored in a
database.

◦ Data abstraction classes (transient)
e University ◦
◦ Database wrapper classes 8
Examples of Data Abstraction
Class

e University
9
Example of Database
Wrapper Class

e University
 10
Class Interface
Specifications
 Class type (class structuring criterion)
 Assumptions
 Anticipated changes
 Superclass (if applicable)
 Inherited operations (if applicable)
 Operations provided by the class. For each operation,
define,
◦ Function performed
◦ Precondition
◦ Postcondition
◦ Invariant
◦ Input parameters
e University ◦ Output parameters
◦ Operations used from other classes
11
Thank you!

e University
12

You might also like