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



define oops concept with example..

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

More OOPS Interview Questions

What are the benefits of interface?

0 Answers  


What is oops?what is its use in software engineering?

0 Answers  


Define a class to represent a bank account. Include the following members: Data Members: Name of the Depositor Account Number Type of Account Balance amount in the account Member Functions: To assign the initial values. To deposit an account. To withdraw an amount after checking the balance. Write a C++ main program to display account number, name and balance.

6 Answers  


What's the full form of STL?

2 Answers  


Polymorphism with an example?

8 Answers   Accenture, emc2,


Following are the class specifications: class {int a}; class {int b}; Using friend funtion,calculate the max of two objects and display it.

0 Answers  


What is namespace?

15 Answers  


In the following declaration of main, "int main(int argc, char *argv[])", to what does argv[0] usually correspond? 1) The first argument passed into the program 2) The program name 3) You can't define main like that

6 Answers  


When is a memory allocated to a class?

11 Answers  


Can anyone please explain runtime polymorphism with a real time example??at what ciscumstances we go for it??

1 Answers  


what are the ways in which a constructors can be called?

0 Answers  


What is a template?

7 Answers  


Categories