Objective-C

This is the archived website of SI 413 from the Fall 2012 semester. Feel free to browse around; you may also find more recent offerings at my teaching page.

Objective-C is an object-oriented variant of C that was invented by the NeXT company in the 1980s. Now you may recall that C++ is also an object-oriented variant of C. The difference is that the way Objective-C does objects is in the style of Smalltalk, by passing messages, rather than using the glorified structs of C++. Who cares, you ask? Well, NeXT was purchased by a small outfit called Apple Computer, and they went ahead and made Objective-C the main programming language of the iMac, iPad, and iPhone operating systems. Suddenly a lot of people are interested in this language! Are you?

Useful Links

How I will run your code

Your code will consist of headers files ending in .h and source files ending in .m. These should all be in the same directory when you submit, and the "main" method should be in proj.m To compile and run your code, I will use the following commands in the CS Linux environment:

. /usr/share/GNUstep/Makefiles/GNUstep.sh
gcc `gnustep-config --objc-flags` -lgnustep-base -lgnustep-gui *.m -o proj
./proj

The first command there just sets in the environment with some standard helpful things (such as the gnustep-config command). You only need to run that line once for every bash session you might use. The second command of course does the actual compiling, and the third command runs the program that it just compiled!

There is an Objective C IDE called "ProjectCenter", which you can access by running exactly that command from the CS Linux environment. You are free to use it, as long as the code you submit follows the guidelines above (i.e., everything should be in .m and .h files, all in one directory, and I can compile and run it from the command line).

Phase 1 Requirements

For this language, you need to implement modifications A, B, C, E, F, and G. See the Phase 1 page for details on what this means.

Phase 2

See the Phase 2 Page for the list of suggested problems. Of the ones listed, I recommend the following as being most well-suited for Objective C:

  1. Make (It should involve some graphical indicator of what files are being remade as it happens.)
  2. Image Creator
  3. Hangman (You would have to make it nice and fancy.)
  4. TODO list
  5. Vending Machine
  6. Game with hidden agenda
  7. ??? (you choose!)