Information Technology Reference
In-Depth Information
a good abstraction. But as an executable representation, a class must also have
other properties beyond those of an abstraction. The three major properties that a
class must possess are that it be (Implementing a class 2006 ):
• Correct: An object of the class must maintain its state properly and respond
to invocations of its methods with the expected results. The most stringent
level of correctness is a formal proof, though such proofs are usually reserved
for safety-critical components due to the high cost of proving correctness of
software. More common are less stringent levels achieved through testing. No
amount of testing establishes the formal correctness of a class. However,
useful
and
measurable
degrees
of
reliability
and
dependability
can
be
achieved.
• Safe: Classes should provide reliable and correct results when implemented in
a manner consistent with the documentation. That is, they should not cause
harm to the system or provide harmful parameters when assigned to another
object type.
• Efficient: The object should make efficient use of the processor and memory
resources. While the most important means for ensuring efficiency reside in
the overall system design and the choice of critical data structures and
algorithms, the class implementer has several ways of improving the effi-
ciency of the implementation. Given the desired properties of abstractions
and those of a class, it is clear that good object-oriented design is a creative
and challenging activity.
The class implementer is responsible for realizing the class under consideration.
Class implementers design the internal data structures and implement the code for
each publication operation. The implementer of classes must be a proficient user of
basic tools. In addition to the obvious need for a compiler, is the need for profi-
ciency in using a symbolic debugger during development and testing. Any system
beyond the most trivial ones also require the use of tools to (re)build the exe-
cutable system from its source code when some part of that code has changed. For
trivial systems, all of the code can be recompiled every time any part of it is
changed. With modest and large systems, this brute force approach is impractical
because the time to recompile and relink the system is excessive. However, it is
not practical for the implementer to remember all of the ways in which parts of the
system must be rebuilt when some parts have changed. Thus, tools must be used to
make the (re)building process efficient and accurate.
The class user invokes the operations provided by the class under consideration
during the realization of another class, called the client class. For class users, the
interface specification discloses the boundary of the class in terms of the services it
provides and the assumptions it makes about the client class.
The class extender develops specializations of the class under consideration.
Like class implementers, class extenders may invoke operations provided by the
class of interest, and focus on specialized versions of the same services. For them,
the interface specification both specifies the current behavior of the class, and any
Search WWH ::




Custom Search