Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

What are the OOPS concepts?

Answer Posted / 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



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Is oop better than procedural?

981


What are the three main types of variables?

1064


why reinterpret cast is considered dangerous?

2337


Get me an image implementation program.

1941


Is html an oop?

1004


How to improve object oriented design skills?

950


Why do we use polymorphism?

1015


What is a superclass in oop?

1112


Where You Can Use Interface in your Project

1837


How is class defined?

1072


What are the 3 principles of oop?

1060


Write a c++ program to display pass and fail for three student using static member function

3328


What is class and example?

1093


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

2073


Why do we need oop?

1108