Difference between Generalization and Inheritance

Ankita Katdare

Ankita Katdare

@abrakadabra Oct 25, 2024
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.

Replies

Welcome, guest

Join CrazyEngineers to reply, ask questions, and participate in conversations.

CrazyEngineers powered by Jatra Community Platform

  • Morningdot Hablu

    Morningdot Hablu

    @morningdot-6Xuj4M Oct 14, 2010

    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..!