/objc

objc programming exercises from 'programming in objective-c' book

Primary LanguageObjective-C

##programming in objective-c

this repo contains all exercises, and perhaps occasionally, relevant source code and code examples from ‘programming in objective-c’ by stephen g. kochan.

the solutions presented here are by no means the only possible, correct, most sophisticated, or elegant ones. they are, though, bug-free and working. you're welcome to make pull requests for exercises you think you've found a better solution — i'll include your solution in the exercise's file.

####how to

single .m files are meant to be copied inside main.m in Xcode and be built. most of them, if not all of them, were from chapters before class file separation (with .h interface and .m implementation files) was taught.

folders include the main.m, classname.h, classname.m files. simply copy and paste them in your own Xcode project and then run the program. to a create class file simply go to File > New File and from the left pane select OS X > Cocoa > Objective-C class. like this:

you can also find sometimes comment blocks indicating an alternative way to solve a given exercise, an explanation of the thought process, etc.

-- upd: exercises from chapters 1, 2 and 3 are not included since chapter 1 is an introductory chapter, most of the exercises in chapter 2 don't involve coding and those who do a) are fairly easy, b) probably didn't save the files while doing them (sorry!), and all exercises in chapter 3 but 7 are not about writing code.

####continuum

Idea: keep a git repo of the exercises from the programming book(s) you currently read, make repo public upon finishing the book. —Apostolos (@apas) March 30, 2013

i think sharing solved programming exercises from programming books in a single, organized place like a repo is a good way to help folks to make progress if they're stuck somewhere. think of this repo as a place where you can come and see how things work, check if your code is similar to the one presented here, where you might have a bug, et cetera.

####license

you're free to do whatever you want with the code. (i) think of it as a learning tool. if you want to share this repo somewhere else, a simple link will be enough.

last but not least, feedback is always welcomed — and as said: if you've found a better solution feel free to pull request and i'll include it.

—@apas