| Author |
Inheritance – Specialization/Generalization
|
Ravi Kiran Va
Ranch Hand
Joined: Apr 18, 2009
Posts: 2234
|
|
Hi
The below line is taken from a UML Tutorial .
- Inheritance is a specialization/generalization relationship between objects of the specialized elements (child) and objects of the generalized elements (parent).
Please tell me are the terms specialization/generalization are same ??
|
Save India From Corruption - Anna Hazare.
|
 |
srees Nivas
Ranch Hand
Joined: Oct 05, 2009
Posts: 51
|
|
Ravi Kiran V wrote:Hi
The below line is taken from a UML Tutorial .
- Inheritance is a specialization/generalization relationship between objects of the specialized elements (child) and objects of the generalized elements (parent).
Please tell me are the terms specialization/generalization are same ??
Hi Ravi Kiran,
I'll try to answer your question.
They are not same. Specialization is the process of moving the specific functionality to the child classes. i.e. the functionality which is very specific to that particular class.
Where as Generalization is the process of moving the common functionality(generalizing) to parent classes. i.e. the functionality is common across all it's children.
For eg: In a car domain, engine, wheels, steering are generalized attributes and moving a car is a generalized functions for all models; which can be moved to parent class. : Generalization
Where as engine with power saver, alloy wheels, steering with music adjustment pad, stereo, moving in cruise mode are specific to a particular model. They can be moved to child classes. : Specialization
Hope this helps.
Best Regards,
Sri.
|
 |
Ravi Kiran Va
Ranch Hand
Joined: Apr 18, 2009
Posts: 2234
|
|
|
Thank you i could not expect a better explanation anywhere . Thank you once again .
|
 |
Simran Narula
Greenhorn
Joined: Apr 22, 2011
Posts: 2
|
|
|
This is a terrific explanation srees Nivas.
|
 |
Jan Cumps
Bartender
Joined: Dec 20, 2006
Posts: 2343
|
|
|
Welcome to the Ranch, Simran!
|
OCUP UML fundamental
ITIL foundation
|
 |
Simran Narula
Greenhorn
Joined: Apr 22, 2011
Posts: 2
|
|
|
Thanks Jan.
|
 |
 |
|
|
subject: Inheritance – Specialization/Generalization
|
|
|