What is generalization? Give an example of generalization

A generalization is an object class, which is a superset of another object class (or classes). Generalization models the “is a” relationship set since members of the specialization class (or classes) are always members of the generalization class. This means that members of the specialization class have all of the same properties of the generalization class including relationships with other objects as well as behaviour. A generalization is used when two classes are similar, but have some differences. Look at the generalization below:

 

What is generalization? Give an example of generalization

In this example the classes Corporate Customer and Personal Customer have some similarities such as name and address, but each class has some of its own attributes and operations. The class Customer is a general form of both the Corporate Customer and Personal Customer classes. This allows the designers to just use the Customer class for modules and do not require in-depth representation of each type of customer

Leave a Reply