What are the OOPS concepts?
Answer Posted / swetcha
1) Encapsulation: It is the mechanism that binds together
code and data in manipulates, and keeps both safe from
outside interference and misuse. In short it isolates a
particular code and data from all other codes and data. A
well-defined interface controls the access to that
particular code and data.
2) Inheritance: It is the process by which one object
acquires the properties of another object. This supports
the hierarchical classification. Without the use of
hierarchies, each object would need to define all its
characteristics explicitly. However, by use of inheritance,
an object need only define those qualities that make it
unique within its class. It can inherit its general
attributes from its parent. A new sub-class inherits all of
the attributes of all of its ancestors.
3) Polymorphism: It is a feature that allows one interface
to be used for general class of actions. The specific
action is determined by the exact nature of the situation.
In general polymorphism means "one interface, multiple
methods", This means that it is possible to design a
generic interface to a group of related activities. This
helps reduce complexity by allowing the same interface to
be used to specify a general class of action. It is the
compiler's job to select the specific action (that is,
method) as it applies to each situation
| Is This Answer Correct ? | 1138 Yes | 208 No |
Post New Answer View All Answers
What is encapsulation with example?
How do you answer polymorphism?
write a program to enter a string like"sunil is a good boy and seeking for a job" not more than 10 characters including space in one line,rest characters should b in other line.if the next line starts from in between the previous word,then print whole word to next line.
What does <> mean pseudocode?
why reinterpret cast is considered dangerous?
What is coupling in oop?
Write a java applet that computes and displays the squares of values between 25 and 1 inclusive and displays them in a TextArea box
What is encapsulation in oop?
What is pointer in oop?
what is different between oops and c++
There are two base class B1,B2 and there is one class D which is derived from both classes, Explain the flow of calling constructors and destructors when an object of derived class is instantiated.
What is property in oops?
How do you achieve polymorphism?
Why is destructor used?
Why we use classes in oop?