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

define oops concept with example

Answer Posted / lata bheemanagar bp

Hi Friends, Good Evening!!
We write Object Oriented Programs.
now, What is Object? --->It is a Real World Entity.
Say for Example:BOX
I want to write a program on this real world entity.It does not mean that i will insert this BOX inside the CPU and write some LOGIC.
I take the properties of this BOX like Height,Width,& Diagonal etc...embed them in a class.and create 'N' number of Objects of this class with different sizes.
This is how we can relate the real world entities in OOPs.
There are mainly 4-types
1) Abstraction---> Hiding complex implementations from users & providing required functionalities to users.
Exp: Birds
We invented 'FLIGTHS' based on the mechanism of Birds,so flight is derived from the base of 'BIRDS'.

2)Inheritence.--->Aquiring properties from one class to another class.
Exp: Human Heridity
aquiring properties from one person to another.

3)Encapsulation->Technique of making fields Private & Providing a Public method to access Private field.
Exp: Pen
In Pen INK is the important thing but it is hiding by some material.

4)Polymorphism->(Many Forms):One Object can take different forms in different situations.
Exp: Crocodile
Crocodile live in differently in Land & in Water.

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Is enum a class?

1005


What is the real life example of polymorphism?

1113


What is advantage of inheritance?

1131


hi, this is raju,iam studying b.tech 2nd year,iam want know about group1 and group2 details, and we can studying without going to any instutions? please help me.

1907


Why is there no multiple inheritance?

956


What is inheritance in oop?

985


What is class and example?

1093


What are properties in oop?

1025


What is constructor overloading in oop?

1080


What is pure oop?

1050


What are the 4 main oop principles?

1171


Can a varargs method be overloaded?

1039


String = "C++ is an object oriented programming language.An imp feature of oops is classes and objects".Write a pgm to count the repeated words from this scenario?

2335


What is polymorphism what are the different types of polymorphism?

949


What is cohesion in oop?

1010