Database Reference
In-Depth Information
Class
Defining
Object (CDO)
Automobile
Gasoline
driven
Diesel
driven
Subclass
Object
instances
Sports car
Pickup truck
Car
Engine
Axle
Gears
Figure 11.1
Subclasses and instance classes of the Class Defining object (CDo) Automobile .
11.1.4.1.1 Inheritance and Encapsulation
A class is also a template from which newer objects can be quickly generated and used. This logi-
cally leads to many important characteristics of object-oriented environments, such as inheritance
and encapsulation . We will illustrate these with reference to Figure 11.1 that shows the various
subclasses and instance classes of the Class Defining Object (CDO) called automobile .
In the automobile illustration, inheritance can be understood in terms of certain standard
characteristics and components, such as the fuel, fuel tank, wheels, gears, axle, and engine,
which can be presumed to be constituents of gasoline and diesel cars. These are properties as
inherited from the four-wheeler class and as inherited, in turn, from the automobile class. It
is not difficult to imagine that this phenomenon of objectification can be carried out in either
direction, from locomotion objects, down to the combustion engine parts, through the Bill
of Materials (BOM). In fact, BOM itself is an example of a legitimate object! This results in a
hierarchy or ladder at each level or step of classes and objects, not unlike the classification hier-
archies of species in biology.
The second important characteristic of encapsulation refers to the transparency of any
object within such a hierarchy of objects. That is, each object (for instance, X) merely performs
a service, and queries as to how that service is accomplished, or for that matter queries regard-
ing the constituting objects of X, are immaterial. If one persists in getting answers to these
queries, one might have to ascend or descend the ladder of inheriting objects for an appropriate
answer.
11.1.4.2 Advantages of Object Orientation
Object orientation has gradually matured, and now it also subsumes activities of planning, analy-
sis, and design of not only information systems but also of enterprise modeling and engineer-
ing. Uses of the object model produce systems that are built upon stable intermediate forms and
Search WWH ::




Custom Search