Skip to content

Commit 86fa1c4

Browse files
committed
added RectangleKata w/ @samanthalangit
1 parent 00ad05a commit 86fa1c4

4 files changed

Lines changed: 33 additions & 33 deletions

File tree

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
package org.teachingkidsprogramming.recipes.completed.section09final;
2+
3+
import org.teachingextensions.logo.Tortoise;
4+
import org.teachingextensions.logo.utils.ColorUtils.PenColors;
5+
6+
public class RectangleKata
7+
{
8+
public static void main(String[] args)
9+
{
10+
Tortoise.show();
11+
Tortoise.setSpeed(10);
12+
Tortoise.setPenColor(PenColors.Blues.Blue);
13+
for (int i = 0; i < 2; i++)
14+
{
15+
drawSide();
16+
drawTopOrBottom();
17+
}
18+
}
19+
private static void drawSide()
20+
{
21+
Tortoise.move(75);
22+
Tortoise.turn(90);
23+
}
24+
private static void drawTopOrBottom()
25+
{
26+
Tortoise.move(150);
27+
Tortoise.turn(90);
28+
}
29+
}

src/main/java/org/teachingkidsprogramming/recipes/completed/section09final/SquareKata.java

Lines changed: 0 additions & 29 deletions
This file was deleted.

src/main/java/org/teachingkidsprogramming/section09final/SquareKata.java renamed to src/main/java/org/teachingkidsprogramming/section09final/RectangleKata.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
package org.teachingkidsprogramming.section09final;
22

3-
public class SquareKata
3+
public class RectangleKata
44
{
55
public static void main(String[] args)
66
{
7-
// Draw a square
7+
// Draw a rectangle
88
// HINT: Write each step in English FIRST, then translate to Java one line at a time
99
// TIP: Be sure to run after each line of Java to make sure it works as expected
1010
}

src/main/java/org/teachingkidsprogramming/section09final/SquareKataTDD.java renamed to src/main/java/org/teachingkidsprogramming/section09final/RectangleKataTDD.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,9 @@
66
import org.junit.Test;
77
import org.teachingkidsprogramming.recipes.completed.section09final.FizzBuzzTDD;
88

9-
public class SquareKataTDD
9+
public class RectangleKataTDD
1010
{
11-
// Draw a square
11+
// Draw a rectangle
1212
// HINT: Write each step in English FIRST, then translate to Java one line at a time
1313
// TIP: Be sure to run after each line of Java to make sure it works as expected
1414
// Write tests using the Assert object via the TDD style shown below

0 commit comments

Comments
 (0)