Created
October 28, 2010 17:26
-
-
Save gmcerveny/651855 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@interface PragBook : NSObject { | |
NSString *title; | |
NSString *author; | |
NSMutableArray *chapters; | |
} | |
@interface Chapter : NSObject { | |
NSString *chapterTitle; | |
NSNumber *pageCount; | |
} | |
----- | |
-(void)createReport { | |
NSLog(@"There are %@ chapters", [self valueForKeyPath:@"[email protected]"]); | |
NSLog(@"The titles are %@", [self.book.chapters valueForKey:@"chapterTitle"]); | |
NSLog(@"The longest chapter is %@ pages long", [self valueForKeyPath:@"[email protected]"]); | |
NSLog(@"The average chapter length is %@", [self valueForKeyPath:@"[email protected]"]); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment