what are the main underlying concepts of object orientation?
Answer Posted / prasi
Abstraction - Interfaces are the best examples of
abstraction .
Encapsulation - Classes are best examples of encapsulation.
Generally we encapsulate what varies &
we abstract commonalities...
One more thing, You should always subclass for behabiours..
you should never subclass for properties / attributes. If
only properties vary, then you have got to encapsulate them
in somewhere else e.g. in a class or in some collection
object like - Properties in Java / Map
Hope this helps..
| Is This Answer Correct ? | 7 Yes | 2 No |
Post New Answer View All Answers
What is difference between polymorphism and normalization?
What is meant by function overloading and function overriding?
What is the purpose of late binding in object-oriented programming?
What is polymorphism and abstraction?
What is a subclass?
What is the difference between aggregation and composition?
What is the main difference between overloading and overriding?
What is the main advantage of using inheritance?
Explain about the analysis phase?
Which oops concept is used as reuse mechanism?
Difference between class and an object?
Explain about polymorphism?
What is the benefit of using inheritance?
What is the difference between an error and an exception?
What is the difference between class inheritance and interface inheritance?