c, or cocoa learning resources

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
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? ;)

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...
 
i think im confused most about the difference between an instance of a class and the class itself... but that was a really clear explination of it.. thanks very much

the further explination of classes was really helpful too

thanks so much for the help, all you guys are awesome... but i have one more question


what is the difference between an instance of a class and an object? an object could be a button... but wouldnt the button also be an instance of the NSButton class? i dont know.. sorry if this is a dumb question


anyays... thanks for all the help
 
Originally posted by paleafterglow

what is the difference between an instance of a class and an object?

At least in OO system analysis & design an object = an instance of a class. Haven't done any OO programming (or much programming of any sort, for that matter), so I won't say anything more. :)
 
Originally posted by nkuvu

Assembly. Definitely. ;)

Or more seriously, I think Java is a good start, C/C++ are both probably a bad start, Perl might be too confusing, a lot of people like Python (I don't, but that's personal preference).

So all in all I'd say Java -- I know that a lot of universities are starting to adopt Java as the "Programming 101" language, then moving to C++ in later courses since C++ is currently the market standard. But Java is simpler, IMHO.

Thanks, by the way, what is Assembly? I'm assuming its a really hard language to learn. Also, If I learnedC++ for Windows, would I be able to program Mac Stuff?
 
Back
Top