What are the OOPS concepts?

Answers were Sorted based on User's Feedback



What are the OOPS concepts?..

Answer / shekhar

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.

Is This Answer Correct ?    1 Yes 0 No

What are the OOPS concepts?..

Answer / satheeshkumar

1.Class & Objects
2.Data Encapsulation
3.Data Abstraction
4.Inheritance
5.Polymorphism

Is This Answer Correct ?    1 Yes 0 No

What are the OOPS concepts?..

Answer / rafi ahmed

Object orientation is a software development methodology
that is based on modeling a real-world system.

An object oriented program consists of classes and objects.


Core Component of object oriented programming.
1)encapsulation
2)abstraction
3)inheritance
4)polymorphism

Is This Answer Correct ?    1 Yes 0 No

What are the OOPS concepts?..

Answer / karan rana

the oops concepts are :-
1. message passing.
2. inheritance.
3. intigrety.
4. polymorphism.

Is This Answer Correct ?    1 Yes 0 No

What are the OOPS concepts?..

Answer / saroj kumar sahoo

OOPs concepts are
1)object
2)class
3)encapsulation
4)abstraction
5)polymorphism
6)inheritance
7)message passing
8)dynamic binding

Is This Answer Correct ?    1 Yes 0 No

What are the OOPS concepts?..

Answer / divin

class
objects
data abstraction
inhertiance
encapulation
polymorshisam

Is This Answer Correct ?    1 Yes 0 No

What are the OOPS concepts?..

Answer / m@@hi agrawal

1.object-objects are basic runtime entity which shows the
behavior of the class.an object has state,behaviour,identity
.in other words "object is known as instance of class".
2.class-a class is collection of objects of similar types.
3.data abstraction-it is a collection of data that describes
a data object.
4.encapsulation-the wrapping of data into a single
unit(called class)known as encapsulation.
5.inheritance-inheritance is the process of creating new
classes (derived class)from base class.
6.polymorphism-it means ability to take more than one
form.i.e. it meanse "many forms".
7.dynamic binding-in dynamic binding,events occur at the run
time.in such function calls the complete address information
is known only at run time.it is known as dynamic binding
because the selection of the apporiate function is done
dynamically at run time.
8.message passing-an object oriented program consist of a
set of object that communicate each other.objects
communicate with one another by receiving & sending
information much the same way as people pass messages to one
another.

Is This Answer Correct ?    1 Yes 0 No

What are the OOPS concepts?..

Answer / priya

the concepts of oops are data abstraction ,data
encapsulation,inheritance,polymorphism ......etc

Is This Answer Correct ?    1 Yes 0 No

What are the OOPS concepts?..

Answer / d. prashant

OOPS concepts

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



A sample program to understand the basic structure of C++




Sample Code



//program to read employee details and to output the data



////////// code begins here /////////////////////////////

#include <iostream> // Preprocessor directive

using namespace std;

class employee // Class Declaration

{

private:

char empname[50];

int empno;



public:

void getvalue()

{

cout<<"INPUT Employee Name:";

cin>>empname;

cout<<"INPUT Employee Number:";

cin>>empno;

}



void displayvalue()

{

cout<<"Employee Name:"<<empname<<endl;

cout<<"Employee Number:"<<empno<<endl;

}

};



main()

{

employee e1; // Creation of Object

e1.getvalue();

e1.displayvalue();

}



///// code ends here //////////////

Is This Answer Correct ?    1 Yes 0 No

What are the OOPS concepts?..

Answer / nivedha

oops means object oriented programming language.it has many
operation such as
encapsulation,polymorphism,class,inheritance,objects,etc.

Is This Answer Correct ?    1 Yes 0 No

Post New Answer

More OOPS Interview Questions

//what is wrong with the programme?? #include<iostream.h> template <class first> class dd { first i; public: void set(); void print(); }; void dd< first>:: set() { cin>>i; } void dd< first>::print() { cout<<"\n"<<i; } void main() { dd <char>g; g.set(); g.print(); }

1 Answers  


What is and I oop mean?

0 Answers  


Round up a Decimal number in c++.. example Note = 3.5 is as 4 3.3 is as 3

3 Answers   Accenture, Cognizant, IBM,


i had specified the access specifier for abstarct class member like (pure virtual function) as private.But it can be accessed by the derived class.How the private member of one class is accessed by other class.if any body face this problem and found the solution plz reply to me.

1 Answers   Syntel,


how can we design a magic square in c++?or suggest me the basic idea of it.

3 Answers  






What are the advantages of polymorphism?

0 Answers  


What is inheritance in simple words?

0 Answers  


What is the difference between pass by reference and pass by value?

12 Answers   Pfizer, TCS,


What is a class oop?

0 Answers  


How can i write a code in c# to take a number from the user and then find all the prime numbers till the number entered by the user.

4 Answers   NIIT, TCS,


What is cohesion in oop?

0 Answers  


What is virtual Function.

1 Answers   Wipro,


Categories