Objects in Object Oriented Programing

So we can say that the objects are instances of a class. Mango tree is an instance of a geneal tree class.

Being an non computer science student it was intially very much dificult to me to understand the concept of the objects. In the computer science world the object is anything which can be described with certain specific atttributes.

In Real world objects can be touched or feel. Like pen is an object which has a specific shape. We can distinguished between pen and pencil with our brain by analyzing the data sent to te brain by our sensors. These datas are collected by the eyes and touch.

But for computer as it don’t have any such sensory collectors we have to tell them by mentioning why it is pen and why it is pencil.

That means we have to provide some data ad certain behaviours that separates the pen and encil.

Similiary between Audi and Honda we have to tell computer how it can distinguish Audi and how it can distinguish the Honda.

So in cmputer world object which is a instance of a specific class comeas with certaini behaviours and certain specific attributes.

e.g. Audi has different logo stats with A and Honda holo starts with H. AUdi has different max speed than Honda. These are the data specific to the individual objects. And also they have certain specific behaviours when you press the accelerators.

Similiar is applicable to the Mango tree and to the Coconuut tree. They have different bshapes and different height. And they also behave in different ways. They give us different fruits.

They responds towards the sun rays differently. Their oxygen production rate are also different. So these attributes and the bhaviours are speific to the inividual objecyts.

So in the term of programing languages the height of a tree can be defined as a specific data types.

Like height can be specified as Number data types. So objects are associated with data.

And also their behaviour can be defined as methods. Such as oxygen production rate as a methode.

Or what we can do with those trees.

Suppose for xampe Orange and Banana both belongs to fruit class. We can make orange squash and make banaa shake. These two are actions. Which is specific to different objects.

So we can draw UML diagram for our understanding. So basically in the object oriented programming we mainly deal with the objects and their different data and behaviours.

So here Apple is an object with specific sets of data like weight and size. Also it’s associated with specific actions or methods like squash in the programing word. Squash is method which takes different inputs like number of Oranges required etc. Which is termed as parameters in the computer science world. Isn’t it’s interesting.

1 Reply to “Objects in Object Oriented Programing”

Comments are closed.