04-29-2011, 08:13 AM
What is generalization ?
Dear Sir
Plz elaborate Generalization and give some example.
regards
Dear Sir
Plz elaborate Generalization and give some example.
regards
|
What is generalization in c++ 2011
|
|
04-29-2011, 08:13 AM
What is generalization ?
Dear Sir Plz elaborate Generalization and give some example. regards
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. 0300-9520262 Get solution in 24 hour |cpmputer & internet mileys81:[SIZE="4"][SIZE="3"]....[/SIZE][/SIZE]
|
|
« Next Oldest | Next Newest »
|