@implementation Wind
-(int) Blow {
int roadCount;
NSSet allRoads;
Man man;
roadCount = 0;
for (Road aRoad in allRoads) {
[man walkDown:aRoad];
if ([man isAMan]) {
break;
} else {
++roadCount;
}
}
return roadCount;
}
@end
@implementation BestClassOfAllTime
-(void) run {
NSSet allLadies;
try {
for (Lady lady in allLadies) {
if (lady.isSingle) {
[lady putHand:UP];
}
}
} catch (NSExceptionLiked) {
throw(exception("Ring not found."));
}
}
@end
Objective C tutorial
Learn iPhone programming the dated and not particularly funny way.