nkuvu
Gone
A class can also contain data. Basically what you're looking for is an explanation of an ADT (abstract data type) which is the same as a class. Easy, huh?Originally posted by paleafterglow
mainly just been reading the "Cocoa Programming for Mac OS X" by Aaron Hillegass... and its actually a really easy to read book.. the only thing is that it assumes that the reader is already at least familar with the terminology. i have gone through some tutorials in the "Programming With Cocoa" section on oreillynet.com and those were pretty good.
i think i understand classes and methods best... let me see if i got it straight
a class is basically a set of methods, and a method is basically a function... is that right?
anyways... thanks for the help and all that
An example of a class could be something like "Shape". In this class, you can have methods (or functions, basically the same terminology but different languages tend to use different words (in C it's called a function, in Java it's a method)). Ahem, Let me get back to where I was before I interrupted myself...
The Shape class could have methods, like Set_Size or Get_Color or Copy or whatever. Along with these methods, it might have built in information. For example, when you use the Set_Size method it alters internal information. The Get_Color method would return the current information.
The hard part for me when I was learning OOP was the difference between an instance of a class and the class itself. The class is more general.
For example, if I am talking about all different kinds of shapes, without talking about specific sizes, colors, or number of sides, I'd be talking about the Shape class. But if I am talking about a blue square that's 1 meter per side, that is an instance of the class Shape.
Hopefully this isn't too confusing...