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

What is boolean in java?

513


What classes of exceptions may be caught by a catch clause in java programming?

705


What is tcp ip in java?

590


Is it possible to cast an int value into a byte variable? What would happen if the value of int is larger than byte?

548


Do you know why doesn't the java library use a randomized version of quicksort?

555






What are the different tags provided in jstl?

553


Is java util regex pattern thread safe?

516


What is the syntax and characteristics of a lambda expression? Explain

545


What is the use of inner class?

546


what is the final keyword denotes in java?

586


What is an argument in java?

511


What is difference between fileinputstream and filereader in java?

562


What are kinds of processors?

571


What is bifunction in java?

680


Explain treeset?

593