explain oops concepts with examples?

Answer Posted / arun from india in madurai

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 ?    438 Yes 63 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is java developer skills?

500


What is numel matlab?

638


Is 0 a prime number?

559


What is the use of string and stringbuffer?

538


How do you use compareto?

540






What is scope of a variable?

593


How can you generate random numbers in java?

577


Can there be an abstract method without an abstract class?

527


What is the difference between numeric and integer?

506


Tell me about your ability to work under pressure

1759


How do you check if a string is lexicographically in java?

492


What is the difference between the paint() and repaint() methods in java programming?

610


What do you understand by synchronization?

580


What is the difference between call by reference and call by pointer?

490


What is an array length?

490