Skip to main content

Posts

Showing posts from November, 2013

Generalization in java with examples

      Generalization basic points  Type/Subtype Relationship  "IS A " Relationship  One class has many subclasses   General class can have many Special classes as  subclasses  General names can be used to Address special names  Top to bottom hierarchy goes towards specialization  Bottom to top Hierarchy goes towards generalization e.g         Soap     Bath Soap and Washing Soap is a subclass of Soap e.g COldDrink   Pepsi      Team -Cold Drink is a general class -Pepsi and team are special classes e.g    Person Teacher       Student e.g            Car     Sedan           Hatchback Honda   Suzuki     Suzuki   Toyota civic        Liana      Alto      vitz ....................................................\ Some Examples from Nature e.g.               Animal            Mammals            Reptiles    Human           Cow     Snake         Croc Student Teacher             Cobra Python     e.g                     Fruits      Mango