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 |
What is namespace?
What is the point of polymorphism?
Finding of the 4 larger (bigger) numbers from the list like{1245,4587,2145,1163,29987,65783.....}
What is the difference between pass by value,pass by pointer,pass by reference in the catch block in the exception handling in c++
write a c++ program to find maximum of two numbers using inline functions.
What are the 4 pillars of oop?
How is exception handling carried out in c++?
write a program using c++ to implement single contiguous memory mangement techniques.display the content of the main memory after yhe allocation of jobs and percentage of the wastage of the main memory
is java purely oop Language?
49 Answers HCL, Infosys, TCS,
what are the different types of qualifier in java?
What does the code "cout<<(0==0);" print? 1) 0 2) 1 3) Compiler error: Lvalue required
WHEN A COPY CONSTER IS CALL ?