Important Notice: Our web hosting provider recently started charging us for additional visits, which was unexpected. In response, we're seeking donations. Depending on the situation, we may explore different monetization options for our Community and Expert Contributors. It's crucial to provide more returns for their expertise and offer more Expert Validated Answers or AI Validated Answers. Learn more about our hosting issue here.

What Is Specialization/Generalization/Overriding?

0
10 Posted

What Is Specialization/Generalization/Overriding?

0

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.

Related Questions

What is your question?

*Sadly, we had to bring back ads too. Hopefully more targeted.