Classification
Classification
Classification
CHAPTER OUTLINES
• Classification.
• Hierarchical Relationship of Classes.
• Generalization/Specialization.
• Organization of Class Hierarchy.
• Abstract and Concrete Class.
2
4.1 CLASSIFICATION
3
4.2 HIERARCHICAL RELATIONSHIP OF CLASSES
Person Superclass
Subclass
Superclass &
Customer Employee
Subclass
WargaUMT
Staff Student
Specialization
A class hierarchy for WargaUMT
6
Classes in a class hierarchy that are so general that there is really no intention
to create objects from them, which contain common attributes
or methods of subclasses for reuse purpose.
E.g.:
• Animal-with-Backbone class has been included into the class hierarchy to
contain properties similar to objects in classes Mammal, Fish, Bird, Reptile,
and Amphibian.
• Animal-without-Backbone class abstract general information about insects
• Animal class generalizes all common properties of classes in its definition
7