@Ankita Katdare • 14 Oct, 2010
I have a subject called "Object Oriented Methodologies".
In this, I frequently come across these two terms: Generalization and Inheritance.

But, the difference between the 2 is not clearly mentioned anywhere.

Can anybody solve this query?
Please provide an example for the same.
@Morningdot Hablu • 14 Oct, 2010 • 1 like If you talk about furit and mango.You can say that fruit is a generalized class of mango.
Where all the mango properties defined a fruit.
But if you talk about mosambi and orange it would be an example of inheritance.Where some properties are extended you may extend the whole properties also.
ya fruit and mango is also an example of inheritance.
So you can say that every generalization example is an example of inheritance but reverse is not true.
Correct me if i am wrong..!
@Karshil Sheth • 26 Jan, 2020 • 2 likes

Generalization is the term that we use to denote abstraction of common properties into a base class in UML. When we implement Generalization in a programming language, it is called Inheritance. So, Generalization and Inheritance are same, the terminology just differs depending on the context where it is being used . It is used for top-down programming and we know all the attributes and things of the project before hand.

@Durgesh Srivastava • 29 Jan, 2020

Inheritance is the process of creating a new classes from an existing class. The Pre-existing class is called base class or super class and the new class is knows as derived class or subclass.Inheritance allows the extension and reuse of existing code, without having to repeat or rewrite the code from scratch 

When we create a base/super class from two or more similar type of objects by extracting their all  common characteristics(attributes and behavior) and combine them, then this process is known as Generalization.

@Swarup Pan • 30 Jan, 2020

In case of Object Oriented Programming, generalization is like to sum up or rather bundle up several functions or methods to a single type or group.

Inheritance is a very useful property of OOP.

If you have declared a parent class and wrote some functions or methods in that class its accessable in that class. Now you make another class and you make it a child class of the previously written class. Now the later written class is a child of the previous class.

Now the later written class can directly use the functions or methods written in the 1st one without being written again in the 2nd class.

Related Posts

I thought of compiling a list of the coolest and the best whatsapp group names that you've been using for your respective groups. For the sake of convenience, we'll stick...
A simple good bye email or last working day mail ain't cool! We've some awesome templates that you can use. If you're looking for an amazing Last Working Day email...
Hello CEans, How to convert CGPA (10 Point Scale) to Percentage? Please help!
I heard many students are having a trouble registering on the TCS Portal, when it's quite straightforward actually. If you have problem in attaching photos or CV, Use internet explorer...
What is IES or Indian Engineering Services Exam? Union Public Services Commission (UPSC) conducts the Engineering Services Exam or ESE 2016 is an entrance exam for graduates who wish to...