Classical Object Oriented Concepts explain a class as a cookie cutter. A class allows you to create objects of the class. As a programmer you define a class with data fields, properties, methods and events. Then you can create objects based on that class that have state (fields, properties) and behavior (methods, events). A class can be considered as a specification of how the object of the class should look like and behave.
<!--MosGoogleAd (c)
Dr Corbeille Sierre, Montana, Valais ... dépannage PC, désinfection Virus, création Web Mambo -->
<script language="javascript"> <!-- google_ad_client = "pub-6339437362895764"; google_ad_width = 336; google_ad_height = 280; google_ad_format = "336x280_as"; google_ad_channel = ""; google_ad_type = "text_image"; google_color_border = "FFFFFF"; google_color_bg = "FFFFFF"; google_color_link = "0033CC"; google_color_url = "0000FF"; google_color_text = "330000"; //--> </script> <script language="javascript" src="http://pagead2.googlesyndication.com/pagead/show_ads.js"></script> <!-- end of google ads -->
An object of the class is nothing other than a sequence of bytes at a specific memory location in the memory heap. Thus we can understand that an object is an instance of the class. We can see an illustration of a class.
Let's see an illustration of a class
Code:
Public Class Class1
Private VehicleType As String
Private VehicleModel As String
Private VehicleColor As String
Public Sub Accelerate()
' add code to Accelerate
End Sub
ReadOnly Property engineCapacity() As Decimal
Get
Return engineCapacity
End Get
End Property
End Class