How specialization differs from generalization . Explain with the suitable example?
Answers
Answered by
0
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.
Specialization is the reverse process of Generalization means creating new sub classes from an existing class.
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.
Specialization is the reverse process of Generalization means creating new sub classes from an existing class.
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.
Similar questions
Chemistry,
6 months ago
Social Sciences,
6 months ago
Political Science,
11 months ago
English,
1 year ago