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 are sealed modifiers?
Does PowerShell support OOPs?
Can I implement polymorphism using abstract class?
Can you explain primordial class loader?
What is garbage collection(gc)?
What are a base class, subclass, and superclass?
How to differentiate between a CreateObject() and GetObject() ?
Why we use oops concepts? What is its advantage?
Explain about parametric polymorphism?
Can we have a default method definition in the interface without specifying the keyword "default"?
What is the difference between an Abstract class and Interface?
Explain basic concepts of OOPS?
Explain about the analysis phase?
How many methods are there in the externalizable interface?
Explain colloboration