Skip to content

Commit faefb6f

Browse files
committed
Updated FizzBuzz - Koan and TDD
1 parent eea6b28 commit faefb6f

3 files changed

Lines changed: 18 additions & 1 deletion

File tree

0 Bytes
Binary file not shown.
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
package org.teachingkidsprogramming.section08tdd;
2+
3+
public class FizzBuzz
4+
{
5+
//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'
9+
//
10+
//NOTE: this is a kata (higher level instructions)
11+
//part of the exercise is to translate into line-by-line English, THEN Java
12+
//
13+
//for more complete directions see this page
14+
//https://www.penflip.com/lynnlangit/tkp-lesson-plans/blob/master/course09.txt
15+
}

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

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,13 @@
22

33
public class FizzBuzzTDD
44
{
5-
//for the whole numbers from 1 to 100, print either that number, or,
5+
//for the numbers being tested, print out either that number, or,
66
//if that number is evenly divisible by 3, then print the word 'Fizz',
77
//if that number is evenly divisible by 5, then print the word 'Buzz',
88
//if that number is evenly divisible by either 3 or 5, then print the word 'FizzBuzz'
9+
//
910
//write tests using the Assert object via the TDD style
11+
//
1012
//for more complete directions see this page
1113
//https://www.penflip.com/lynnlangit/tkp-lesson-plans/blob/master/course09.txt
1214
}

0 commit comments

Comments
 (0)