|
![](/i/fill.gif) |
"You make a new type by declaring a class."
Wrong.
"A class is just a collection of variables - often of different types -
combined with a set of related functions."
It might be more accurate to say that an /object/ is a collection of
variables. At any rate, "collection" usually means something more
specific in this case.
"A class enables you to encapsulate, or bundle, these variables parts
and various functions into one collection, which is called an object."
Where do I start?
I'm pretty sure "encapsulate" doesn't mean what you think it means. :-P
A "collection" usually refers to a group of objects, which isn't what
you're talking about.
And finally, this is perhaps the most vague definition of an object I've
ever heard. :-P
The next goes on to explain that classes are good because everything
related to a thing is in one place. (Like you couldn't just write all
the code together if it wasn't for classes.) Obviously this /isn't/
what's so special about classes. The /actual/ benefits don't appear to
be mentioned.
I'm going to stop now, because otherwise I'll just go on forever... >_<
Post a reply to this message
|
![](/i/fill.gif) |