Third exercise for Stanford CS193P online Objective C course