Frequently Asked Interview Questions

Generalization

Generalization (“is a” relationship):

The generalization relationship indicates that one of the two related classes is considered to be a more general form of the other.
(Or)
Many similar existing objects are combined to form a superclass to do the job of its subclass, and then it is known as Generalization. The generalization relationship is also known as the Inheritance or parent/child relation or “is a” relationship.

Example: From the below figure, if you see from the perspective of the Train, then it is Generalization. The common functions or operations of both the Passenger and Goods Trains are put into the Train such as startTrain, stopTrain, fillFuel. That is, the generic operations of any subclass of Train are included in Train





Most Visited Pages

Home | Site Index | Contact Us