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

What is predicate in java?

677


What are pass by reference and pass by value?

608


What are the different types of java?

647


Under what conditions is an object’s finalize() method invoked by the garbage collector?

654


What isan abstract class and when do you use it?

1001






What is 32 bit float?

650


What are benefits of java?

674


What kind of variables a class can consist of?

734


Why do we need data structure in java?

682


What does i ++ mean in Java?

599


Can we restart a dead thread in java?

642


Print Vertical traversal of a Binary Tree.

681


What is flag in python?

657


What are class types in java?

674


What is size_t?

600