File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Inheritance – Specialization/Generalization

 
Ravi Kiran Va
Ranch Hand
Posts: 2234
Eclipse IDE Firefox Browser Redhat
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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 ??

 
srees Nivas
Ranch Hand
Posts: 51
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 2234
Eclipse IDE Firefox Browser Redhat
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thank you i could not expect a better explanation anywhere . Thank you once again .
 
Simran Narula
Greenhorn
Posts: 2
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
This is a terrific explanation srees Nivas.
 
Jan Cumps
Bartender
Posts: 2576
11
C++ Linux Netbeans IDE
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Welcome to the Ranch, Simran!
 
Simran Narula
Greenhorn
Posts: 2
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks Jan.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic