spacer
spacer

Visual Basic & VB.NET resources | VBprofs.com

Google
 
Main Menu
Home
IT News
Articles
Source Codes
Books
Calendar of Events
Publish your Content
Links Directory
Reviews and Recs
Premium Content
 VBprofs Premium Content Become a member to get access to our premium content! 

 Membership is entirely free, and allows you to:
  •  access programming projects posted by our partners;
  •  publish your articles, news, links;
  •  publish a project request;
  •  access our VB Careers section.
Polls
How did you reach VBprofs.com?
  
Which is your favorite programming language?
  
Related Items
 
Home arrow Articles arrow Programming / Development Articles (non VB) arrow Object Oriented Programming Part 2

Object Oriented Programming Part 2 PDF Print E-mail
Articles - Programming / Development Articles (non VB)
Written by Simon Katich   

Programming ArticlesClasses and Objects - Encapsulation

Welcome Back!!

Previously we have covered the following that every thing on this earth has Physical Properties and Utilization or DATA and FUNCTIONS. In this post we will get more technical and shall be covering concept of Classes and Objects and ENCAPSULATION.

Don't get to worried about all this technical jargon, we will try to keep it simple; so that we can keep our flight as smooth as we can.

We know that in terms of things we categorized them as Living things & Non-Living things. Among living things we have mammals, amphibians, fish etc. not to forget we have plants as well!!

So if we know the DNA structure of a single species we can create multiple species of the same kind. Remember Jurassic Park!!! Do not consider that I am a movie maniac, just there happened to be lot of good movies on the subject.

Precisely on the same level; if we have a DNA structure for chair (if it were) we can create lots of chairs with the same qualities.

This is the difference between CLASS and OBJECT.

Class is the DNA structure or a blue print to create multiple species of the same Nature that we call Object.

Simple Isn’t it.

So we fly higher, that if we combine DATA & FUNCTIONS in form of a class we have achieved ENCAPSULATION.

So pretty well you can consider that when the machines understood the blue print of each and every thing on this earth, they just had to create multiple objects of each blue print to create a virtual world. Ask your self then... is MATRIX possible?

Take every example on this earth that you can find; each thing will belong to a Category which is the CLASS for it and each instance of that category will OBJECT.

Look at the Star and Solar Systems; Each PLANET belongs to a PLANET class and each PLANET itself is an object of that class.

Now you must be asking that all the planets are not the same, and yes that is precisely the idea. That object will have some different data like each planet has different size, mass and environment. But always remember that we are talking about different VALUES of data, not the data it self.

Like each planet has SIZE, MASS, they are generally OVAL.

On the same pattern if you consider HUMAN BEINGS, each of us has the same characters generally and yet our faces are different; as the VALUES of our DATA is different from each other.

So its all about classification of a thing (object) in a particular class; we put those objects together and BAM!!! We have created our world.

In the next article we will cover INHERITANCE & POLYMORPHISM and move on to the practical issues about designing an object oriented solutions.

Happy Flying!!

For further reading please refer to http://it-pedia.blogspot.com

Simon Katich has been associted with IT domain for last 20 years and runs his own blog at http://it-pedia.com and http://it-pedia.blogspot.com.

< Prev   Next >

 
Antivirus Shop
BitDefender Antivirus v10
Newsflash

PowerRefresh 1.0 released!
A simple yet extremely useful tool for webmasters, publishers and SEO working bees: PowerRefresh allows you to automatically refresh your IE windows every x minutes. It can handle unlimited number of windows and, unlike similar applications, is using full browsers.


Get PowerRefresh from Kaloyani.com: download
Login Form
Username

Password

Remember me
Forgotten your password?
No account yet? Create one
Popular

VBprofs.com - online resources for Visual Basic and VB.NET professionals: Visual Basic and VB.NET articles, industry news and events, career tools, VB / VB.NET books, calendar and much more. VBprofs.com is an interactive web site with free membership.
(c) Copyright 2005 - 2006 by VBprofs.com
powered by Mambo Open Source Software
spacer