A Java exercise taken from Exercism.io
I did not create this assignment. The coded solution is mine. This was a Java practice project which helped me with String manipulation methods.
Bob is a lackadaisical teenager. In conversation, his responses are very limited.
Bob answers 'Sure.' if you ask him a question.
He answers 'Whoa, chill out!' if you yell at him.
He answers 'Calm down, I know what I'm doing!' if you yell a question at him.
He says 'Fine. Be that way!' if you address him without actually saying anything.
He answers 'Whatever.' to anything else.
bob.hey(" hmmmmmmm...") -> "Whatever." bob.hey("Tom-ay-to, tom-aaaah-to.") -> "Whatever." bob.hey("\t\t\t\t\t\t\t\t\t\t") -> "Fine. Be that way!" bob.hey("") -> "Fine. Be that way!" bob.hey("ZOMG THE %^*@#$(*^ ZOMBIES ARE COMING!!11!!1!") -> "Whoa, chill out!" bob.hey("FCECDFCAAB") -> "Whoa, chill out!" bob.hey("fffbbcbeab?") -> "Sure." bob.hey("You are, what, like 15?") -> "Sure." bob.hey("WHAT WERE YOU THINKING?") -> "Calm down, I know what I'm doing!"