explain oops concepts with examples?

Answer Posted / manoj donga

OOP is Nothing but Object Oriented Programming.
In OOPs concept is implimented in our real life systems.
OOPs have following features
1. Object - Instance of class
2. Class - Blue print of Object
3. encapsulation - Protecting our data
4. polymorphism - Different behaviors at diff. instances
5. abstraction - Hidding our irrelavance data
6. inheritence - one property of object is aquring to
another property of object

Simple Ex.

Please assume u standing near a car. How to impliments our
OOPs concept for this scenario ?

Simple,
car is a object b'coz it having more functions.
car is a class b'coz it contain more parts and features
inside.
car is a Encapsulation B'coz it protected some unwanted
parts or functions to user
car is a Polymorphism b'coz it have different speed as
display in same speedometer
car is a Abstraction b'coz it hidding more parts by coverig
such as engine,disel tank
car is a Inheritance b'coz one car is a property of more
people. i mean your car is driving bu you, your friend and
your relatives.

Is This Answer Correct ?    26 Yes 8 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Why stringbuilder is not thread safe?

541


What is difference between printf and scanf?

517


Explain the importance of finally over return statement?

608


What is a static class in java?

555


What is the difference between the direct buffer and non-direct buffer in java?

540






Why is it important to initialize a variable?

491


Describe what a thread-local variable is in java?

566


What is the difference between post and put?

535


What is the main difference between java platform and other platforms?

507


What is the difference between instanceof and isinstance?

564


What is the purpose of encapsulation?

540


Why static functions are used?

568


What is integer parseint?

551


how does multithreading take place on a computer with a single cpu? : Java thread

691


Is it correct to say that due to garbage collection feature in java, a java program never goes out of memory?

573