What are the OOPS concepts?

Answers were Sorted based on User's Feedback



What are the OOPS concepts?..

Answer / shanti

oops concepts include 1.Encapsulation
2.Inheritance
3.Polymorphism

Is This Answer Correct ?    2 Yes 2 No

What are the OOPS concepts?..

Answer / anjali dadhich

Before starting to learn C++ it is essential that one must
have a basic knowledge of the concepts of Object oriented
programming. Some of the important object oriented features
are namely:

• object
• Classes
• Inheritance
• Data Abstraction
• Data Encapsulation
• Polymorphism
• Overloading
• Reusability
In order to understand the basic concepts in C++, the
programmer must have a command of the basic terminology in
object-oriented programming. Below is a brief outline of
the concepts of Object-oriented programming languages:

Objects:
Object is the basic unit of object-oriented programming.
Objects are identified by its unique name. An object
represents a particular instance of a class. There can be
more than one instance of an object. Each instance of an
object can hold its own relevant data.



An Object is a collection of data members and associated
member functions also known as methods.

Classes:
Classes are data types based on which objects are created.
Objects with similar properties and methods are grouped
together to form a Class. Thus a Class represent a set of
individual objects. Characteristics of an object are
represented in a class as Properties. The actions that can
be performed by objects becomes functions of the class and
is referred to as Methods.

For example consider we have a Class of Cars under which
Santro Xing, Alto and WaganR represents individual Objects.
In this context each Car Object will have its own, Model,
Year of Manufacture, Colour, Top Speed, Engine Power etc.,
which form Properties of the Car class and the associated
actions i.e., object functions like Start, Move, Stop form
the Methods of Car Class.

No memory is allocated when a class is created. Memory is
allocated only when an object is created, i.e., when an
instance of a class is created.

Inheritance:
Inheritance is the process of forming a new class from an
existing class or base class. The base class is also known
as parent class or super class, The new class that is
formed is called derived class. Derived class is also known
as a child class or sub class. Inheritance helps in
reducing the overall code size of the program, which is an
important concept in object-oriented programming.

Data Abstraction:
Data Abstraction increases the power of programming
language by creating user defined data types. Data
Abstraction also represents the needed information in the
program without presenting the details.

Data Encapsulation:
Data Encapsulation combines data and functions into a
single unit called Class. When using Data Encapsulation,
data is not accessed directly; it is only accessible
through the functions present inside the class. Data
Encapsulation enables the important concept of data hiding
possible.

Polymorphism:
Polymorphism allows routines to use variables of different
types at different times. An operator or function can be
given different meanings or functions. Polymorphism refers
to a single function or multi-functioning operator
performing in different ways.

Overloading:
Overloading is one type of Polymorphism. It allows an
object to have different meanings, depending on its
context. When an exiting operator or function begins to
operate on new data type, or class, it is understood to be
overloaded.

Reusability:
This term refers to the ability for multiple programmers to
use the same written and debugged existing class of data.
This is a time saving device and adds code efficiency to
the language. Additionally, the programmer can incorporate
new features to the existing class, further developing the
application and allowing users to achieve increased
performance. This time saving feature optimizes code, helps
in gaining secured applications and facilitates easier
maintenance on the application.

The implementation of each of the above object-oriented
programming features for C++ will be highlighted in later
sections.

Is This Answer Correct ?    0 Yes 0 No

What are the OOPS concepts?..

Answer / ramana

1)Object-Instance of the class
2)Classes-Combination of Data members and member functions
3)Data Abstraction-Abstracting the data and functions from
unwanted users.
4)Data Encapsulation-Wrapping up of Data members and member
functions.
5)Inheritance-Passing the values from one object to anther
object.
6)Message Passing-Messages can possible from one object to
anther object
7)Polymorphism-its like function over loading.
Poly-Many, morphism-Forms
8)Robust and Securisam-its for security purpose

Is This Answer Correct ?    0 Yes 0 No

What are the OOPS concepts?..

Answer / badri

OOPs concepts are
1)object
2)class
3)encapsulation
4)abstraction
5)polymorphism
6)inheritance
7)message passing
8)dynamic binding
BASIC CONCEPT OF OOPS:
1.OBJECTS:
An object is an abstraction of a real world entity. It may
represent a person,a placea number and icons or something
else that can be modelled.Any data in an object occupy some
space in memory and can communicate with eachother .
2.CLASSES:
A class is a collection of objects having common
features .It is a user defined datatypes which has data
members as well functions that manupulate these datas.
3.ABSTRACTION:
It can be definr\ed as the seperation of unnecessary
details or explation from system requirments so as to
reduce the complaxities of understanding requirments.
4.ENCAPTULATION:
It is a mechanism that puts the data and function together.
It is bthe result of hiding implimintation details of an
object from its user .The object hides its data to de
accessed by only those functions which are packed in the
class of that object.
5.INHERITANCE:
It is the relationship between two classes of object such
that one of the classes ,the child takes all the relevent
features of other class -the parent.
Inheritance bring about reusablity.
6.POLYMORPHISM:
polymorphism means having many forms that in a single
entity can takes more than one form.Polymorphism is
implemented through operator overloading and function
overloading.
7.DYNAMIC BINDING:
Dynamic binding is the proces of resolving the function to
be associated with yhe respective functions calls during
their runtime rather than compile time.
8.MESSAGE PASSING:
Every data in an objest in oops that is capable of
processing request known as message .All object can
communicate with each other by sending message to each other

Is This Answer Correct ?    0 Yes 0 No

What are the OOPS concepts?..

Answer / prabu

This mainthing is oops concept.

polymorphism,
inheritence,
encapsulation.

Is This Answer Correct ?    0 Yes 0 No

What are the OOPS concepts?..

Answer / sruthi

In object oriented programming apporach there is a
collection of objects and this is a bottom up approach ,the
main focus is on objects .Data reusability is one of the
important feature of OOP,the focus of object oriented
programming is DATA

Is This Answer Correct ?    0 Yes 0 No

What are the OOPS concepts?..

Answer / nitesh jain

The OOPS concepts are:
Abstraction
Encapsulation
Polymorphism
Interface

Is This Answer Correct ?    0 Yes 0 No

What are the OOPS concepts?..

Answer / krish

oops conepts are:
1. object
2.encapsulation
3.abstraction
4.class
5.polimorphism
6. message passing
7.inheristance
8.dynamic binding

Is This Answer Correct ?    0 Yes 0 No

What are the OOPS concepts?..

Answer / manoj kumar verma

Object Oriented Programming (OOP) is used to build OOPs.
Object are the basic building block of Object Oriented
Programming System (oops).The real world objects have two
characteristics: state and behavior.
OOPs consist of the following features:
1. Encapsulation
2. Abstraction
3. Inheritance
4. Polymorphism
Encapsulation: Encapsulation is the process of hiding of the
details of an object that do not contribute to its essential
characteristics.
Means, hiding of the data members or packing of data members
and methods inside a single unit. i.e. class
For example:
Class A
{
int x,y,z; // member data
teach(); // member method
A manoj; object
}
Where “A” is the class name and manoj is the object of class.
Abstraction: Only show the essential details and do not show
the non essential details. i.e. concentrate an
essential/compulsory any parts.
Like tv, buttens like on/off switch, color, volume channel
are shows but reset parts are encapsulated.
Inheritance: Inheritance enables you to extend the
functionality of an existing class. You create a class that
inherits the attributes and behavior of another class. The
new class can consist of a few new attributes and behaviors
that are specific to the class.
“Reusability of the code by making derived class from the
base class.
i.e.
father -> child.
More properties/features are with child class.
A class is made looking at which the new derived class id
made with modifications or additions in the derived class.
Polymorphism: when one object shows various forms then it is
known as polymorphism.
Poly -> many
Morphism ->form
Many forms of an object.
For i.e. with one mobile button you can do various actions
at different times.

Is This Answer Correct ?    0 Yes 0 No

What are the OOPS concepts?..

Answer / ankit pandey

There are five concepts in the oops others may be
derived from those:
1. Encapsulation and Data Abstraction
2. Polymorphism
3. Dynamic Binding
4. Message Passing
5. Inheritance


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. 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

3. 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.

4. Dynamic Binding:
The property of object-oriented programming
languages where
the code executed to perform a given operation is
determined
at run time from the class of the operand(s)


5. Message Passing :
In the terminology of some object-oriented programming
languages, a message is the single means to pass control to
an object. If the object "responds" to the message, it has
a method for that message. In pure object-oriented
programming, message passing is performed exclusively
through a dynamic dispatch strategy.[citation needed]
Objects can send messages to other objects from within
their method bodies. Message passing enables extreme late
binding in systems. Sending the same message to an object
twice will usually result in the object applying the method
twice. Two messages are considered to be the same message
type, if the name and the arguments of the message are
identical. Some languages support the forwarding
ordelegation of method invocations from one object to
another if the former has no method to handle the message,
but "knows" another object that may have one

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More OOPS Interview Questions

What is stream in oop?

0 Answers  


Describe what an Interface is and how it?s different from a Class.

7 Answers   Spinsys,


how many types of notations are in java

1 Answers   National University of Modern Languages (NUML),


what is the virtual function overhead, and what is it used for ? i hope i can get and appropriate answers, thanks a lot....

6 Answers  


What is R T T I ?

6 Answers   Ness Technologies,






What is nutshell in programming language?

1 Answers   Satyam, Tech Mahindra,


what is a virtual class?

5 Answers   Cap Gemini, IBM, Infosys, Trinity Technologies,


what is new modifier in C#

8 Answers   HCL,


There are 2 classes defined as below public class A { class B b; } public class B { class A a; } compiler gives error. How to fix it?

3 Answers   Microsoft,


Can we override main method?

0 Answers  


What is abstraction with example?

0 Answers  


Why is it so that we can have virtual constructors but we cannot have virtual destructors?

2 Answers  


Categories