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


Please Help Members By Posting Answers For Below Questions

Templates mean

1592


What is difference between data abstraction and encapsulation?

620


What is polymorphism in oops?

562


which feature are not hold visual basic of oop?

1725


What is the example of polymorphism?

562






what are the ways in which a constructors can be called?

1585


What are the benefits of oop?

607


#include #include #include #include void insert(char *items, int count); int main(void) { char s[255]; printf("Enter a string:"); gets(s); insert(s, strlen(s)); printf("The sorted string is: %s.\n", s); getch(); return 0; } void insert(char *items, int count) { register int a, b; char t; for(a=1; a < count; ++a) { t = items[a]; for(b=a-1; (b >= 0) && (t < items[b]); b--) items[b+1] = items[b]; items[b+1] = t; } } design an algorithm for Insertion Sort

2172


Write A Program to find the ambiguities in Multiple Inheritance? How are they resolved.(Virtual Functions)

3557


Can static class have constructor?

587


What do you mean by Encapsulation?

645


Can bst contain duplicates?

675


i=20;k=0; for(j=1;k-i;k+=j<10?4:3) { cout<

1419


What is polymorphism programming?

607


Why do we use oop?

607