OOPS Concept for Interview Purpose

oops is a programming model where programs are organized around objects. Here a problem is divided into a number of entities called objects.in detail: a software is divided in to several objects. then functions and actions are build according to the objects. hence the data around a object can be accessed by the functions related to it.

oops has the following features :
class
it is like a skeleton or template of a object.it does not occupy any memmory space.

object
its basic runtime entity of a class.it also known as an instance of a class.it will occupy memory space.

main conepts :
1.Abstraction
2.Encapsulation
3.Polymorphism
4.Inheritance

Abstraction
Abstraction means hiding unrelevant data...and revealing only the important. Its application is at the design level.
Example:
External details of a mobile phone such as a display screen and keypads

Encapsulation
as the name suggests including or enclosing all the related functions and data in a single object. hiding the intenal details of an objects. Its application is at the implementation level.Encapsulation is for providing security.
Example:
Internal details of a mobile phone such as how its display and keypads connected

Inheritance 
a process of object reusability, a child includes properties of its parent.
Example:
Its like father and son relationships. Son gets fathers physical properties.

polymorphism
one name multiple forms. Here one single function or object will behave as different forms.
Example:
Consider a phone as an object. With its existence, it is a single object. But it behaves in different forms like Camera, Radio, Phone etc..

Comments