|
|
@@ -1,5 +1,5 @@
|
|
1
|
|
-public class BeerSong {
|
|
2
|
|
- public String verse(int number) {
|
|
|
1
|
+class BeerSong {
|
|
|
2
|
+ String verse(int number) {
|
|
3
|
3
|
switch (number) {
|
|
4
|
4
|
case 0:
|
|
5
|
5
|
return "No more bottles of beer on the wall, no more bottles of beer.\nGo to the store and buy some more, 99 bottles of beer on the wall.\n\n";
|
|
|
@@ -12,7 +12,7 @@ public class BeerSong {
|
|
12
|
12
|
}
|
|
13
|
13
|
}
|
|
14
|
14
|
|
|
15
|
|
- public String sing(int start, int stop) {
|
|
|
15
|
+ String sing(int start, int stop) {
|
|
16
|
16
|
StringBuilder songOutput = new StringBuilder();
|
|
17
|
17
|
|
|
18
|
18
|
for (int i=start; i>=stop; i--) {
|
|
|
@@ -22,7 +22,7 @@ public class BeerSong {
|
|
22
|
22
|
return songOutput.toString();
|
|
23
|
23
|
}
|
|
24
|
24
|
|
|
25
|
|
- public String singSong() {
|
|
|
25
|
+ String singSong() {
|
|
26
|
26
|
return sing(99,0);
|
|
27
|
27
|
}
|
|
28
|
28
|
}
|