04-29-2011, 08:13 AM
In OO models, some class may have common characteristics. Extract these common features into a new class and inherit original class from this new class. The concept of generalization in OOP means that an object encapsulates common state and behavior for a category of objects.
Example:
In class Student, Teacher, Doctor has the common states like Name, age, gender and common attributes like eat, walk etc. So extracting all the common characteristics in a new class e.g. Shape. And inherit Student, Teacher, and Doctor Classes from the Shape class. This is called generalization.
Example:
In class Student, Teacher, Doctor has the common states like Name, age, gender and common attributes like eat, walk etc. So extracting all the common characteristics in a new class e.g. Shape. And inherit Student, Teacher, and Doctor Classes from the Shape class. This is called generalization.
0300-9520262
Get solution in 24 hour |cpmputer & internet
mileys81:[SIZE="4"][SIZE="3"]....[/SIZE][/SIZE]
