|
|
@@ -1,15 +1,18 @@
|
|
1
|
1
|
/**
|
|
2
|
2
|
* Bob is a lackadasical teenager.
|
|
3
|
3
|
*/
|
|
4
|
|
-public class Bob {
|
|
5
|
|
- public String hey(String input) {
|
|
|
4
|
+class Bob {
|
|
|
5
|
+ String hey(String input) {
|
|
6
|
6
|
input = normalize(input);
|
|
7
|
|
- if (isSilence(input))
|
|
|
7
|
+ if (isSilence(input)) {
|
|
8
|
8
|
return "Fine. Be that way!";
|
|
9
|
|
- if (isShout(input))
|
|
|
9
|
+ }
|
|
|
10
|
+ if (isShout(input)) {
|
|
10
|
11
|
return "Whoa, chill out!";
|
|
11
|
|
- if (isQuestion(input))
|
|
|
12
|
+ }
|
|
|
13
|
+ if (isQuestion(input)) {
|
|
12
|
14
|
return "Sure.";
|
|
|
15
|
+ }
|
|
13
|
16
|
return "Whatever.";
|
|
14
|
17
|
}
|
|
15
|
18
|
|