explain oops concepts with examples?

Answer Posted / vikram chandra

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 ?    101 Yes 30 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Can we have multiple public classes in a java source file?

549


What is difference between static class and normal class?

525


Is java free for businesses?

577


What are thread local variables?

542


What are the three parts of a lambda expression? What is the type of lambda expression?

561






How does split work in java?

526


Given a singly linked list, determine whether it contains a loop or not without using temporary space?

577


Is singleton class immutable?

530


What is private static in java?

571


What is a conditional statement explain with example?

534


What is the difference between Java1.4 and Java1.5

1821


What do you understand by private, protected and public?

510


How to solve the problem of generating the unique hash keys with hash function?

1453


What are extraneous variables examples?

520


What is stringjoiner ?

571