diff --git a/objc-speaking-grandma/FISAppDelegate.m b/objc-speaking-grandma/FISAppDelegate.m index 13dce12..3571623 100644 --- a/objc-speaking-grandma/FISAppDelegate.m +++ b/objc-speaking-grandma/FISAppDelegate.m @@ -18,11 +18,37 @@ @implementation FISAppDelegate - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { // Override point for customization after application launch. - /** - - * Write your code here! - - */ + NSString *talkToGrandma = @"HI, GRANDMA!"; + NSString *shoutAtGrandma = [talkToGrandma uppercaseString]; + BOOL shouting = [talkToGrandma isEqualToString:shoutAtGrandma]; + + talkToGrandma = @"Hi, Grandma!"; + shoutAtGrandma = [talkToGrandma uppercaseString]; + + if (shouting){ + NSLog(@"NO, NOT SINCE 1938"); + } else { + NSLog(@"WHAT, SPEAK UP SONNY!"); + } + + if ([talkToGrandma isEqualToString:shoutAtGrandma]){ + NSLog(@"NO, NOT SINCE 1938"); + } else { + NSLog(@"WHAT, SPEAK UP SONNY!"); + } + + if (!shouting){ + NSLog(@"NO, NOT SINCE 1938"); + } else { + NSLog(@"WHAT, SPEAK UP SONNY!"); + } + + if (![talkToGrandma isEqualToString:shoutAtGrandma]){ + NSLog(@"NO, NOT SINCE 1938"); + } else { + NSLog(@"WHAT, SPEAK UP SONNY!"); + } + return YES; // Don't alter this statement. }