Information Technology Reference
In-Depth Information
8.1.1 First Steps to OOD
Edward Berard presents the following steps as if they were sequential, some of
them may be re-ordered, and some may even be accomplished in parallel.
The first part of the OOD process requires that the software engineer accom-
plish two different goals: identify the objects of interest, and specify how these
objects will affect a solution to the problem. A software engineer must construct an
object-oriented model of the proposed solution. The object-oriented model can be
accomplished using any one of a number of strategies:
(a) Writing a paragraph: Identifying the objects from the nouns, pronouns, noun
phrases, adjectives etc.
(b) Constructing a graphical model using such things as semantic networks, state
transition diagrams, Petri net graphs, or any other variety of diagrams.
(c) Using an automated tool to sketch a solution, e.g. Smalltalk, Trellis.
Once the strategy is agreed upon, the objects of interest can be identified. The
designer should also gather information about each object and localize it with the
appropriate object.
The next major step requires the designer to identify suffered and required
operations for each object. A ''suffered'' operation is something which happens to
a given object, e.g. adding an element to a list, directing an elevator to go up, and
querying a temperature sensor as to its current value. A ''required'' operation is an
operation for an object other than the encapsulating object, and is necessary to
ensure the correct and desired behavior of the object. For example, if we wish a list
object to be ordered, it will require that the items contained in the list furnish a
''\'' (less than) operation (Berard 2002 ).
Object design includes four groups of activities:
Reuse Class libraries and components are selected for basic data structures and
services. Design patterns are selected for solving problem and for protecting
specific classes from future change. Often, components and design patterns need to
be adapted before they can be used. This is done by wrapping custom objects
around them or refining them by using inheritance.
Interface Specification During this activity, the subsystem services identified
during system design are specified in terms of class interfaces, including opera-
tions, and exceptions. The result of service specification is a complete interface
specification for each subsystem. The subsystem specification is called subsystem
Application Programmer Interface (API).
Restructuring activities manipulate the system model to increase code reuse or
meet other design goals. Restructuring activities include transforming n-ary
associations into binary associations, implementing binary associations as refer-
ences, merging two classes into a single class or collapsing classes, and rear-
ranging to increase inheritance and packing.
Optimization
activities
address
performance
requirements
of
the
system
model.
This
includes
changing
algorithms
to
respond
to
speed,
memory
Search WWH ::




Custom Search