Slide 49
Slide 49 text
class Bob
def hey(input)
if input == "Tom-ay-to, tom-aaaah-to."
return "Whatever."
elsif input == "WATCH OUT!"
return "Whoa, chill out!"
elsif input == "Does this cryogenic chamber make me look fat?"
return "Sure."
elsif input == "You are, what, like 15?"
return "Sure."
elsif input == "Let's go make out behind the gym!"
return "Whatever."
elsif input == "It's OK if you don't want to go to the DMV."
return "Whatever."
elsif input == "WHAT THE HELL WERE YOU THINKING?"
return "Whoa, chill out!"
elsif input == "1, 2, 3 GO!"
return "Whoa, chill out!"
elsif input == "1, 2, 3"
return "Whatever."
elsif input == "4?"
return "Sure."
elsif input == "ZOMG THE %^*@#$(*^ ZOMBIES ARE COMING!!11!!1!"
return "Whoa, chill out!"
elsif input == "I HATE YOU"
return "Whoa, chill out!"
elsif input == "Ending with ? means a question."
return "Whatever."
elsif input == "Wait! Hang on. Are you going to be OK?"
return "Sure."
elsif input == ""
return "Fine. Be that way!"
elsif input == " "
return "Fine. Be that way!"
elsif input == " "
return "Fine. Be that way!"
elsif input == " "
return "Fine. Be that way!"
elsif input == "Does this cryogenic chamber make me look fat?\nno"
return "Whatever."
end
end
end
Iteration #1
class Bob
def hey (input )
if input=="Tom-ay-to, tom-aaaah-to."
return"Whatever."
elsif input == "WATCH OUT!"
return "Whoa, chill out!"
elsif input == "Does this cryogenic chamber make me look fat?"
return "Sure."
elsif input== "You are, what, like 15?"
return "Sure."
elsif input == "Let's go make out behind the gym!"
return "Whatever."
elsif input == "It's OK if you don't want to go to the DMV."
return "Whatever."
elsif input == "WHAT THE HELL WERE YOU THINKING?"
return "Whoa, chill out!"
elsif input == "1, 2, 3 GO!"
return "Whoa, chill out!"
elsif input =="1, 2, 3"
return "Whatever."
elsif input=="4?"
return "Sure."
elsif input == "ZOMG THE %^*@#$(*^ ZOMBIES ARE COMING!!11!!1!"
return "Whoa, chill out!"
elsif input == "I HATE YOU"
return"Whoa, chill out!"
elsif input == "Ending with ? means a question."
return "Whatever."
elsif input== "Wait! Hang on. Are you going to be OK?"
return "Sure."
elsif input==""
return"Fine. Be that way!"
elsif input == " "
return "Fine. Be that way!"
elsif input == " "
return "Fine. Be that way!"
elsif input==" "
return "Fine. Be that way!"
elsif input == "Does this cryogenic chamber make me look fat?\nno"
return"Whatever."
end
end
end