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