faqts : Computers : Programming : Languages : C#

+ Search
Add Entry AlertManage Folder Edit Entry Add page to http://del.icio.us/
Did You Find This Entry Useful?

1 of 1 people (100%) answered Yes
Recently 1 of 1 people (100%) answered Yes

Entry

What is the class? Explain me with example.

Jul 6th, 2006 03:42
Deepak Sharma, Tony Cruise,


What Is a Class? 
In the real world, you often have many objects of the same kind. For
example, your bicycle is just one of many bicycles in the world. Using
object-oriented terminology, we say that your bicycle object is an
instance of the class of objects known as bicycles. Bicycles have some
state (current gear, current cadence, two wheels) and behavior (change
gears, brake) in common. However, each bicycle's state is independent of
and can be different from that of other bicycles. 
When building them, manufacturers take advantage of the fact that
bicycles share characteristics, building many bicycles from the same
blueprint. It would be very inefficient to produce a new blueprint for
every bicycle manufactured. 
In object-oriented software, it's also possible to have many objects of
the same kind that share characteristics: rectangles, employee records,
video clips, and so on. Like bicycle manufacturers, you can take
advantage of the fact that objects of the same kind are similar and you
can create a blueprint for those objects. A software blueprint for
objects is called a class
Deepak
http://www.blueappleonline.com