lotus

previous page: 1.13) Why Don't Some People Like Inheritance? (Object-Oriented Technology)
  
page up: Object-Oriented Technology FAQ
  
next page: 1.15) What Is The Difference Between Object-Based And Object-Oriented? (Object-Oriented Technology)

1.14) What Is Specialization/Generalization/Overriding? (Object-Oriented Technology)




Description

This article is from the Object-Oriented Technology FAQ, by Bob Hathaway rjh@geodesic.com with numerous contributions by others.

1.14) What Is Specialization/Generalization/Overriding? (Object-Oriented Technology)

To create a subclass is specialization, to factor out common parts of
derived classes into a common base (or parent) is generalization [Booch 91,
p56]. Overriding is the term used in Smalltalk and C++ for redefining a
(virtual in Simula and C++) method in a derived class, thus providing
specialized behavior. All routines in Smalltalk are overridable and non-
"frozen" features in Eiffel can be "redefined" in a derived class. Whenever
a method is invoked on an object of the base class, the derived class method
is executed overriding the base class method, if any. Overriding in Simula
is a combination of overloading and multiple-polymorphism because parameters do
not have to be declared. Eiffel and BETA are examples of languages allowing
any member to be redefined and not just methods, as is typical.

 

Continue to:













TOP
previous page: 1.13) Why Don't Some People Like Inheritance? (Object-Oriented Technology)
  
page up: Object-Oriented Technology FAQ
  
next page: 1.15) What Is The Difference Between Object-Based And Object-Oriented? (Object-Oriented Technology)