Skip to content

Commit c91ad0c

Browse files
committed
FizzBuzz update suggested by @KevlinHenney
1 parent 75c93dc commit c91ad0c

4 files changed

Lines changed: 9 additions & 9 deletions

File tree

0 Bytes
Binary file not shown.

TeachingKidsProgramming/src/org/teachingkidsprogramming/section09final/FizzBuzz.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,9 @@
33
public class FizzBuzz
44
{
55
// For the whole numbers from 1 to 100, print either that number, or,
6-
// If that number is evenly divisible by 3, then print the word 'Fizz',
7-
// If that number is evenly divisible by 5, then print the word 'Buzz',
8-
// If that number is evenly divisible by either 3 or 5, then print the word 'FizzBuzz'
6+
// If that number is divisible by 3, then print the word 'Fizz',
7+
// If that number is divisible by 5, then print the word 'Buzz',
8+
// If that number is divisible by either 3 or 5, then print the word 'FizzBuzz'
99
//
1010
// NOTE: this is a kata (higher level instructions)
1111
// part of the exercise is to translate into line-by-line English, THEN Java

TeachingKidsProgramming/src/org/teachingkidsprogramming/section09final/FizzBuzzGoldenMaster.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,9 @@ public void testNumbers() throws Exception
1919
public static String convert(int i)
2020
{
2121
// For the whole numbers from 1 to 100, print either that number, or,
22-
// If that number is evenly divisible by 3, then print the word 'Fizz',
23-
// If that number is evenly divisible by 5, then print the word 'Buzz',
24-
// If that number is evenly divisible by either 3 or 5, then print the word 'FizzBuzz'
22+
// If that number is divisible by 3, then print the word 'Fizz',
23+
// If that number is divisible by 5, then print the word 'Buzz',
24+
// If that number is divisible by either 3 or 5, then print the word 'FizzBuzz'
2525
return "";
2626
}
2727
}

TeachingKidsProgramming/src/org/teachingkidsprogramming/section09final/FizzBuzzTDD.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,9 @@
33
public class FizzBuzzTDD
44
{
55
// For the numbers being tested, print out either that number, or,
6-
// If that number is evenly divisible by 3, then print the word 'Fizz',
7-
// If that number is evenly divisible by 5, then print the word 'Buzz',
8-
// If that number is evenly divisible by either 3 or 5, then print the word 'FizzBuzz'
6+
// If that number is divisible by 3, then print the word 'Fizz',
7+
// If that number is divisible by 5, then print the word 'Buzz',
8+
// If that number is divisible by either 3 or 5, then print the word 'FizzBuzz'
99
//
1010
// Write tests using the Assert object via the TDD style
1111
//

0 commit comments

Comments
 (0)