[Tutor] Classes, Classes, Classes

Gerrit Holl Gerrit Holl <gerrit@nl.linux.org>
Fri, 12 Nov 1999 07:32:55 +0100


R Parker wrote:
> Hello, I am experiencing trouble understanding classes. I don't
> understand how they work, what they do and their purpose in general. I
> am a newbie so dont make it too complicated because this is the first
> programming language I'm learning.
> Thanks in advance!

A class is representing something. For example, a list is a class, in fact.
With a list you can do several things: .sort, .append, .pop, etc. This way,
you could also write a game with a class representing the main person in the
game. That person can .jump(), .walk_faster(), .dive(), etc.

What book are you learning from, or are you learning from the WWW?

regards,
Gerrit.
-- 
linuxgames.nl.linux.org	 All about games on Linux in Dutch (under construction).
www.nl.linux.org	       The Dutch resource for Dutch Linux documentation.
www.nl.linux.org/discoverb		    Learn foreign words and definitions.
www.nl.linux.org/~gerrit/asperger	 I'm an Asperger, go here for more info.
www.nl.linux.org/~gerrit			    About me and pictures of me.