What are the OOPS concepts?

Answer Posted / sirisha

oops concepts are
1.Object
An object is collection of data members and associated
member functions.

2.Class
Class is a data structure which encapsulates data and
member function in a single unit and the member funtions of
the class are used to access member variables.

3.Abstraction
Abstraction is of the process of hidding data.
or
Identifying the important properties of existing modes.

4.Encapsulation
The wrapping up of data and methods in a single unit is
known as encapsulation.

5.Polymorphism
Process of aquiring properties from one object to another
with changes.
or
The same operation can be applied differntly in diffent
objects.
ex:5+2,a+b.

6.Inheritance
Process of aquiring properties from one object to another
without changes.
or
Identifying the important features based on one class to
next class.

Is This Answer Correct ?    4 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Where You Can Use Interface in your Project

1429


What is Difeerence between List obj=new ArrayList(); and ArrayList obj=new ArrayList()?

2109


Can you name some types of inheritance?

641


What is pure oop?

599


What is oops in programming?

569






What do you mean by overloading?

582


Can bst contain duplicates?

670


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

3847


How oops is better than procedural?

589


What is encapsulation c#?

601


design a c++ class for the chess board,provide a c++ class definition for such class(only class definition is required)

6155


What is abstraction in oop?

637


What is class and object with example?

588


How Do you Code Composition and Aggregation in C++ ?

24205


Question In a class, there is a reference or pointer of an object of another class embedded, and the memory is either allocated or assigned to the new object created for this class. In the constructor, parameters are passed to initialize the data members and the embedded object reference to get inialized. What measures or design change should be advised for proper destruction and avioding memory leaks, getting pointers dangling for the embedded object memory allocation? Please suggest. Question Submitted By :: Sunil Kumar I also faced this Question!! Rank Answer Posted By Re: In a class, there is a reference or pointer of an object of another class embedded, and the memory is either allocated or assigned to the new object created for this class. In the constructor, parameters are passed to initialize the data members and the embedded object reference to get inialized. What measures or design change should be advised for proper destruction and avioding memory leaks, getting pointers dangling for the embedded object memory allocation? Please suggest. Answer # 1 use copy constructors 0 Shanthila There is something to be taken care in destructor, in copy constructor, suppose the memory is assigned to the embedded member object pointer with the parameter passed value, but if some other objects of different class also are pointing to this memory, then if some one deletes the object then this class member pointer object will become dangling, or if the object is not deleted properly then there will be memory leak. Please suggest the design change required to handle or avoid this situation

1662