Assignments

Class 4 & 5: Events & Multitouch

  1. Read through this weeks tutorial.  Once you’ve finished take the red square tutorial and modify it so that you can use a single touch to rotate the red square.  Commit your changes to GitHub.  You should be able to rotate the square clockwise and counter-clockwise. Change the tutorial so you can rotate the square with two fingers.  Commit your changes to GitHub.  For extra, extra points make it so that you can also scale and translate the square as well.  For the particularly inspired, add the ability to manipulate multiple squares (it would be trivial once you get here to have a interactive light table app).

Class 3:  An Objective-C Primer

  1. Convert the Objective-C tutorial into it’s iPhone equivalent.
  2. Zip and send me your XCode project.
  3. Bring in a design for iPhone app that you would like to do.  You can only use pencil and paper.  Create a brief series of slides of  your app.  We will go through these together in class.

Class 2: Languages Tools & Open Societies

  1. Read the Installing Git tutorial.
  2. Create and setup a free GitHub account. Create a repository for the assignment.  Do not wait to do #1 or #2, they will involve some time on your part.  If you don’t get these out of the way early you will probably not be able to finish this assignment in time.
  3. Read the class tutorial on Objective-C.  Use it as a starting point.  Define a new class in the same file called YourClass.  Define one method (besides init/dealloc) called goodbye that takes no parameters and returns NSString*.  In this method call return an NSString with the contents “Goodbye, nice seeing you!”.  Check and make sure that this works.  Commit your file to GitHub in this state.
  4. Add an instance variable friend of type YourClass* to the MyClass interface for storing a reference to an instance of your newly defined class.  Create a setter and getter for this variable- add setFriend/friend methods to the MyClass implementation.  setFriend returns void and receives an argument of type YourClass*. setFriend should release anything that was previously stored in the instance variable friend, and retain the argument passed in. The friend method takes nothing and returns a value of type YourClass*.  Commit your file to GitHub in this state.
  5. In main allocate an instance of YourFriend and set it as the friend the MyClass instance.  The following NSLog statements should be in your code and work. 
    NSLog(@"This is my friend %@ and he says '%@'", [instance friend], [[instance friend] goodbye]);
  6. commit the state of 6 to GitHub.  Post the link to your repository on the class blog.
  7. Sign up to do a solo presentation and/or class discussion lead.  Any slots not filled by the end of Tuesday will be randomly handed out.

Class 1: History & Heuristics

  1. Prepare at least 3-5 questions about the C programming reading.  Write a program that takes a string and reverses it.  You do not need to allocate memory, you can use a char array to hold the reversed string.  The important thing to remember is that strings in C end in the null terminating control character \0 (SLASH ZERO).  Don’t forget in C single characters are designated by single quotes and strings by double quotes.  Do not look for answer on the internet and do not ask for help.  Do not use C string facilities.  You just need a for loop.  printf both the original string and the reversed string. You need to get through this one yourself, all the information you need is in the readings.  You will have trouble the whole semester otherwise.  Email me your code.
  2. Download Squeak and get it running on your system.  Follow the instructions in the Squeak tutorial.  Send me your zipped Squeak image.
  3. Give me your email address so that I can added you to ITP NYU iPhone Developer group.  I will also use this email address to add you to the class blog as well as the Google Group.