Difference Between Generalization and Specialization
Keywords
: generalization and specialization with example, understanding generalization
and specialization
The process of extracting common characteristics from two or more classes
and combining them into a generalized superclass, is called Generalization. The
common characteristics can be attributes or methods. Generalization is
represented by a triangle followed by a line. Let’s take an example of Bank Account; A Bank Account is of two types – Current Account and Saving Account. Current Account and Saving Account inherits the common/ generalized properties like Account Number, Account Balance etc. from a Bank Account and also have their own specialized properties like interest rate etc.
No comments:
Post a Comment