Mother of OOPS-Idly kadai aaya

You may be little confused about the title.But  I believe at the end of this blog you all will agree with the title …:-)

Today our story is about OOPS. I remember, I had OOPS in my fifth semester .That is the time when my interest towards programming was in budding stage.So myself and one of my friend decided to join a computer center to learn C++.

At that time we don’t have abundant online content like now.And also I don’t have computer at that time.So computer center is the only option to look at the the computer other than our computer. lab in college

The center name is Radian I guess.I dono whether it is still functional. I got a wonderful teacher in that center .Her name is Sowmya.She is the one who first taught me about classes and objects.

The example she has given is, consider the blueprint of the house as class and the object as the house itself.With the same blue print we can build ‘n’ number of houses.See how powerful it is, I still remember that example.

But when I happened to do a video about classes and objects for GUVI,I was in break to take care of my kid. So i am most connected to kitchen rather than the anything else.So whatever video I have done at that time mostly will have smell of my kitchen 🙂

Now we come to our title reason,I see our idly aaya is the founder of classes and objects. See, idly plate is the class .It defines the structure of our idly and the idlies are our objects.So like our film directors I  made justice to the title by referring idly aaya in this line 🙂

idly kadai

Now coming to the technical part class is a user defined datatype. Here comes the question what is datatype and what is datastructure?.To make people believe still I am connected to kitchen I will give examples from my kitchen itself.

For example we can consider tumbler, plates,container etc… everything is a datatype .Each serves different purpose.

Small tumbler ,we can consider as integer,bigger tumbler as float,Jug as double .They all belong to  same category and the differentiating factor is the quantity they can hold.But plate and tumbler we can compare as integer and string.Plate is for eating something and tumbler is for drinking.They serve different purpose.

Then comes our introduction of hero of our story. Did you remember the vessel stand in your home ?

vessel standcan you tell what data type it is ,this is  none other than our structure and class.To tell correctly this is object and the design of this stand is class.We are having integer(tumbler),string(plates),byte(spoons) etc…. in the same stand. All these are analogies purpose only don’t dig too much 🙂

Ok Ok like Keladi Kanmani Radhika asking to SPB ,”moochu vidama padrenu soneenga” ,u people are asking what happened to datastructure.Yes I will explain it now.

I always have  trouble in finding out some ingredients when I work in other people’s kitchen.That too if all containers look alike it will be more difficult.

Arranging the containers in a way it is easy for anyone  to take anything is data structure,way of organizing data.If we keep everything in a single row its an array.

steel boxarray

Mom never search for anything she knows correctly which  one  ishaving what .But if it happens that I have to do something,I have to a linear search to find the ingredient I need.But if I remember someway that mom usually keeps them in first row ,I can do a binary search,since i can ignore remaining racks.

So like these examples OOPS is there in every walk of our life.Even the way we arrange our dresses in wardrobe is a data structure.We arrange it in such a way that it will be easy for us to search and keep dresses.

wardwobe

See you all soon in next blog….. Before that hit the like button if you really like  this post:-) or else also you can hit like ..no restrictions

-Sridevi Arunprakash

 

For more idly ideas.. 😛  Visit us at http://www.guvi.in

Advertisements

9 thoughts on “Mother of OOPS-Idly kadai aaya

  1. Hi sridevi i am little confused, how we can visualize, see and touch a class, in your case as idly plates.

    • Hi Narayan, Thanks for reading the blog .coming to ur question we can’t touch class as u say but this is only for analogy . structure is defined by class ,like that idly plate defines only shape but only when we put idly flour we get idly.Like that memory is allocated only when object is created

  2. @Narayan,
    First thanks for comment 🙂 now coming to the answer,we cant get idlies until and unless we pour idly flour in the plate.Likewise we cant get objects until we allocate memory for it.Both class and idly plates are defining a structure only.I believe this makes sense

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s