About Me

header ads

WHAT IS OOP

WHAT IS OOP?

A computer program is written to solve a real world problem using computers.
As a program is essentially a model or some real world scenario .
It would be more effective to think of a program in the same way be perceive the world around us .
We look at real world as composing of different -2 objects like human beings , animals , trees , rivers etc.
These objects can be described as certain properties and behaviors.
The object in the real world interact with other objects in a constant way .
In oop , we consider a program as a collection of different -2 objects that interact with each other to well defined interface..
A program in oop consist generally two things


CLASS
A class is a blueprint /template for creating objects of its type . a class is merely a concept and does not occupies memory .in oop we define class before we can create an object of their types.

OBJECT
An object is a real world entity . An object is creating according to the definition of class . An object occupies memory space .