Page 173 - DCAP308_OBJECT_ORIENTED_ANALYSIS_AND_DESIGN
P. 173
Unit 14: Steps for Class Design
classes for minimizing execution time, memory, and other cost measures. New classes may be Notes
introduced to store intermediate results during program execution and avoid recomputation.
OO design is an iterative process. During object design, the designer carries out the strategy
chosen during the system design and fleshes out the details. There is a shift in emphasis from
application domain concepts toward computer concepts. In this unit, we will discuss the steps
included in class design.
14.1 Steps of Class Design
The objects discovered during analysis serve as the skeleton of the design, but the object designer
must choose among different ways to implement them with an eye toward minimizing execution
time, memory and other measures of cost.
!
Caution The operations identified during the analysis must be expressed as algorithms,
with complex operations decomposed into simpler internal operations.
The classes, attributes and associations from analysis must be implemented as specific data
structures. New object classes must be introduced to store intermediate results during program
execution and to avoid the need for recomputation.
Notes Optimization of the design should not be carried to excess, as ease of implementation,
maintainability, and extensibility are also important concerns.
During object design, the designer must perform the following steps:
1. Combining the three models to obtain operations on classes
2. Design algorithms to implement operations.
3. Refactoring
4. Optimize access paths to data.
5. Implement control for external interactions
6. Adjust class structure to increase inheritance.
7. Design associations.
8. Determine object representation.
9. Package classes and associations into modules
The steps included in class design are discussed below:
14.1.1 Combining the Three Models to Obtain Operations on Classes
After analysis, we have object, dynamic and functional model, but the object model is the main
framework around which the design is constructed. The object model from analysis may not
show operations. The designer must convert the actions and activities of the dynamic model and
the processes of the functional model into operations attached to classes in the object model.
Each state diagram describes the life history of an object. A transition is a change of state of the
object and maps into an operation on the object. We can associate an operation with each event
received by an object. In the state diagram, the action performed by a transition depends on both
LOVELY PROFESSIONAL UNIVERSITY 167