From c3f47ad1268d8f6aaa38646858b5a2627637d0af Mon Sep 17 00:00:00 2001 From: Daniel Ceballos Date: Tue, 18 Jun 2013 14:00:33 -0700 Subject: [PATCH 01/13] Working on Square-Daniel/Dorothy --- .../org/teachingkidsprogramming/recipes/SimpleSquare.java | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/TeachingKidsProgramming/src/org/teachingkidsprogramming/recipes/SimpleSquare.java b/TeachingKidsProgramming/src/org/teachingkidsprogramming/recipes/SimpleSquare.java index 855d3c6a..e7669f31 100644 --- a/TeachingKidsProgramming/src/org/teachingkidsprogramming/recipes/SimpleSquare.java +++ b/TeachingKidsProgramming/src/org/teachingkidsprogramming/recipes/SimpleSquare.java @@ -1,16 +1,18 @@ package org.teachingkidsprogramming.recipes; +import org.teachingextensions.logo.Tortoise; public class SimpleSquare { public static void main(String[] args) throws Exception { - // Show the tortoise --#1 + Tortoise.show(); // Make the tortoise move as fast as possible --#6 // Do the following 4 times --#5.1 // Change the color of the line the tortoise draws to "blue" --#4 - // Move the tortoise 50 pixels --#2 + Tortoise.move(50); // Turn the tortoise to the right (90 degrees) --#3 + Tortoise.turn(90); // Repeat --#5.2 } } From c978f8326c768d7a15819d5149ef4d105bed06e3 Mon Sep 17 00:00:00 2001 From: Daniel Ceballos Date: Tue, 18 Jun 2013 14:07:08 -0700 Subject: [PATCH 02/13] Working on Daniel-Dorothy --- .../recipes/SimpleSquare.java | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/TeachingKidsProgramming/src/org/teachingkidsprogramming/recipes/SimpleSquare.java b/TeachingKidsProgramming/src/org/teachingkidsprogramming/recipes/SimpleSquare.java index e7669f31..dfaccdeb 100644 --- a/TeachingKidsProgramming/src/org/teachingkidsprogramming/recipes/SimpleSquare.java +++ b/TeachingKidsProgramming/src/org/teachingkidsprogramming/recipes/SimpleSquare.java @@ -1,5 +1,6 @@ package org.teachingkidsprogramming.recipes; +import org.teachingextensions.logo.Colors; import org.teachingextensions.logo.Tortoise; public class SimpleSquare @@ -9,9 +10,17 @@ public static void main(String[] args) throws Exception Tortoise.show(); // Make the tortoise move as fast as possible --#6 // Do the following 4 times --#5.1 - // Change the color of the line the tortoise draws to "blue" --#4 + Tortoise.setPenColor(Colors.Blues.Blue); + Tortoise.move(50); + Tortoise.turn(90); + Tortoise.setPenColor(Colors.Blues.Blue); + Tortoise.move(50); + Tortoise.turn(90); + Tortoise.setPenColor(Colors.Blues.Blue); + Tortoise.move(50); + Tortoise.turn(90); + Tortoise.setPenColor(Colors.Blues.Blue); Tortoise.move(50); - // Turn the tortoise to the right (90 degrees) --#3 Tortoise.turn(90); // Repeat --#5.2 } From a80d1203938044f22549fdbb3f277a77deee9b76 Mon Sep 17 00:00:00 2001 From: Daniel Ceballos Date: Tue, 18 Jun 2013 14:13:55 -0700 Subject: [PATCH 03/13] Finished Daniel/Dorothy --- .../recipes/SimpleSquare.java | 22 ++++++------------- 1 file changed, 7 insertions(+), 15 deletions(-) diff --git a/TeachingKidsProgramming/src/org/teachingkidsprogramming/recipes/SimpleSquare.java b/TeachingKidsProgramming/src/org/teachingkidsprogramming/recipes/SimpleSquare.java index dfaccdeb..b0b6f00d 100644 --- a/TeachingKidsProgramming/src/org/teachingkidsprogramming/recipes/SimpleSquare.java +++ b/TeachingKidsProgramming/src/org/teachingkidsprogramming/recipes/SimpleSquare.java @@ -8,20 +8,12 @@ public class SimpleSquare public static void main(String[] args) throws Exception { Tortoise.show(); - // Make the tortoise move as fast as possible --#6 - // Do the following 4 times --#5.1 - Tortoise.setPenColor(Colors.Blues.Blue); - Tortoise.move(50); - Tortoise.turn(90); - Tortoise.setPenColor(Colors.Blues.Blue); - Tortoise.move(50); - Tortoise.turn(90); - Tortoise.setPenColor(Colors.Blues.Blue); - Tortoise.move(50); - Tortoise.turn(90); - Tortoise.setPenColor(Colors.Blues.Blue); - Tortoise.move(50); - Tortoise.turn(90); - // Repeat --#5.2 + Tortoise.setSpeed(10); + for (int i = 1; i <= 4; i++) + { + Tortoise.setPenColor(Colors.Blues.Blue); + Tortoise.move(50); + Tortoise.turn(90); + } } } From 0847d828f34240ddab25298edbc4303548bf915e Mon Sep 17 00:00:00 2001 From: Daniel Ceballos Date: Tue, 18 Jun 2013 14:59:50 -0700 Subject: [PATCH 04/13] Refactor square-Dorothy/Daniel --- .../org/teachingkidsprogramming/recipes/SimpleSquare.java | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/TeachingKidsProgramming/src/org/teachingkidsprogramming/recipes/SimpleSquare.java b/TeachingKidsProgramming/src/org/teachingkidsprogramming/recipes/SimpleSquare.java index b0b6f00d..18a3ce37 100644 --- a/TeachingKidsProgramming/src/org/teachingkidsprogramming/recipes/SimpleSquare.java +++ b/TeachingKidsProgramming/src/org/teachingkidsprogramming/recipes/SimpleSquare.java @@ -9,11 +9,13 @@ public static void main(String[] args) throws Exception { Tortoise.show(); Tortoise.setSpeed(10); - for (int i = 1; i <= 4; i++) + int sides = 4; + for (int i = 1; i <= sides; i++) { Tortoise.setPenColor(Colors.Blues.Blue); + Tortoise.setPenWidth(2); Tortoise.move(50); - Tortoise.turn(90); + Tortoise.turn(360 / sides); } } } From 9d7bb10bcff736d37f8dc82cb68bec0b5a0d2735 Mon Sep 17 00:00:00 2001 From: Daniel Ceballos Date: Tue, 18 Jun 2013 15:11:12 -0700 Subject: [PATCH 05/13] simple variations square-Dorothy/Daniel --- .../teachingkidsprogramming/recipes/SimpleSquare.java | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/TeachingKidsProgramming/src/org/teachingkidsprogramming/recipes/SimpleSquare.java b/TeachingKidsProgramming/src/org/teachingkidsprogramming/recipes/SimpleSquare.java index 18a3ce37..b033b13f 100644 --- a/TeachingKidsProgramming/src/org/teachingkidsprogramming/recipes/SimpleSquare.java +++ b/TeachingKidsProgramming/src/org/teachingkidsprogramming/recipes/SimpleSquare.java @@ -9,13 +9,13 @@ public static void main(String[] args) throws Exception { Tortoise.show(); Tortoise.setSpeed(10); - int sides = 4; + int sides = 17; for (int i = 1; i <= sides; i++) { - Tortoise.setPenColor(Colors.Blues.Blue); - Tortoise.setPenWidth(2); - Tortoise.move(50); - Tortoise.turn(360 / sides); + Tortoise.setPenColor(Colors.getRandomColor()); + Tortoise.setPenWidth(7); + Tortoise.move(23); + Tortoise.turn(360.0 / sides); } } } From dcee0e5a4974e21583caea312118f18f03081b4e Mon Sep 17 00:00:00 2001 From: Daniel Ceballos Date: Tue, 18 Jun 2013 15:22:28 -0700 Subject: [PATCH 06/13] Complex variation- Dorothy/Daniel --- .../teachingkidsprogramming/recipes/SimpleSquare.java | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/TeachingKidsProgramming/src/org/teachingkidsprogramming/recipes/SimpleSquare.java b/TeachingKidsProgramming/src/org/teachingkidsprogramming/recipes/SimpleSquare.java index b033b13f..6a249630 100644 --- a/TeachingKidsProgramming/src/org/teachingkidsprogramming/recipes/SimpleSquare.java +++ b/TeachingKidsProgramming/src/org/teachingkidsprogramming/recipes/SimpleSquare.java @@ -2,6 +2,7 @@ import org.teachingextensions.logo.Colors; import org.teachingextensions.logo.Tortoise; +import org.teachingextensions.windows.MessageBox; public class SimpleSquare { @@ -9,13 +10,13 @@ public static void main(String[] args) throws Exception { Tortoise.show(); Tortoise.setSpeed(10); - int sides = 17; + int sides = MessageBox.askForNumericalInput("How many sides would you like?"); for (int i = 1; i <= sides; i++) { Tortoise.setPenColor(Colors.getRandomColor()); - Tortoise.setPenWidth(7); - Tortoise.move(23); - Tortoise.turn(360.0 / sides); + Tortoise.setPenWidth(i * 3.5); + Tortoise.move(i * 5); + Tortoise.turn(360.0 * -3 / sides); } } } From 0afa8e74013172e32e3c1a77c02b066ad072ac8a Mon Sep 17 00:00:00 2001 From: Daniel Ceballos Date: Tue, 18 Jun 2013 15:50:23 -0700 Subject: [PATCH 07/13] Simple Square Quiz- Dorothy/Daniel --- .../recipes/quizzes/SimpleSquareQuiz.java | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/TeachingKidsProgramming/src/org/teachingkidsprogramming/recipes/quizzes/SimpleSquareQuiz.java b/TeachingKidsProgramming/src/org/teachingkidsprogramming/recipes/quizzes/SimpleSquareQuiz.java index 5f284d93..e4a6b8d0 100644 --- a/TeachingKidsProgramming/src/org/teachingkidsprogramming/recipes/quizzes/SimpleSquareQuiz.java +++ b/TeachingKidsProgramming/src/org/teachingkidsprogramming/recipes/quizzes/SimpleSquareQuiz.java @@ -1,5 +1,7 @@ package org.teachingkidsprogramming.recipes.quizzes; +import org.teachingextensions.logo.Colors; +import org.teachingextensions.logo.Tortoise; import org.teachingkidsprogramming.recipes.quizzes.graders.SimpleSquareQuizGrader; import org.teachingkidsprogramming.recipes.quizzes.graders.SquareQuiz; @@ -7,19 +9,19 @@ public class SimpleSquareQuiz implements SquareQuiz { public void question1() { - // Turn the tortoise 1/5 of 360 degrees to the right + Tortoise.turn(360 / 5); } public void question2() { - // Move the tortoise 110 pixels + Tortoise.move(110); } public void question3() { - // Change the color the tortoise draws to yellow + Tortoise.setPenColor(Colors.Yellows.Yellow); } public void question4() { - // Change the width of the line the tortoise draws to 5 pixels + Tortoise.setPenWidth(5); } public static void main(String[] args) { From 54069fd3d62d97daab2402cd88c745d36086e295 Mon Sep 17 00:00:00 2001 From: Daniel Ceballos Date: Tue, 18 Jun 2013 15:50:41 -0700 Subject: [PATCH 08/13] Spiral -Dorothy/Daniel --- .../org/teachingkidsprogramming/recipes/Spiral.java | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/TeachingKidsProgramming/src/org/teachingkidsprogramming/recipes/Spiral.java b/TeachingKidsProgramming/src/org/teachingkidsprogramming/recipes/Spiral.java index 14d93669..3666aee5 100644 --- a/TeachingKidsProgramming/src/org/teachingkidsprogramming/recipes/Spiral.java +++ b/TeachingKidsProgramming/src/org/teachingkidsprogramming/recipes/Spiral.java @@ -1,18 +1,22 @@ package org.teachingkidsprogramming.recipes; +import org.teachingextensions.logo.Tortoise; public class Spiral { public static void main(String[] args) { - // Show the tortoise --#1 + Tortoise.show(); // Make the tortoise go as fast as possible --#4 // Add Blue Violet to the Color Wheel --#6 // Add Violet to the Color Wheel --#8 // Add Purple to the Color Wheel --#9 // Do the following 75 times --#3 - // Change the color of the line the tortoise draws the next color on the Color Wheel --#7 - // Move the tortoise 5 times the current line number you are drawing --#5 - // Turn the tortoise 1/3 of 360 degrees to the right --#2 + for (int i = 1; i <= 75; i++) + { + // Change the color of the line the tortoise draws the next color on the Color Wheel --#7 + // Move the tortoise 5 times the current line number you are drawing --#5 + Tortoise.turn(360 / 3); + } } } From 0a423fb2a79a118c97b5c54ff3f524695786fd53 Mon Sep 17 00:00:00 2001 From: Matt Wimer Date: Wed, 19 Jun 2013 14:45:17 -0700 Subject: [PATCH 09/13] finished Homework -Daniel/Reeder --- .../recipes/homework/Homework01.java | 42 +++++++++---------- 1 file changed, 20 insertions(+), 22 deletions(-) diff --git a/TeachingKidsProgramming/src/org/teachingkidsprogramming/recipes/homework/Homework01.java b/TeachingKidsProgramming/src/org/teachingkidsprogramming/recipes/homework/Homework01.java index ee1f46c1..5f6e6b28 100644 --- a/TeachingKidsProgramming/src/org/teachingkidsprogramming/recipes/homework/Homework01.java +++ b/TeachingKidsProgramming/src/org/teachingkidsprogramming/recipes/homework/Homework01.java @@ -3,13 +3,11 @@ import junit.framework.Assert; import org.junit.Before; -import org.junit.Ignore; import org.junit.Test; import org.teachingextensions.logo.Tortoise; import org.teachingextensions.logo.Turtle; import org.teachingextensions.logo.utils.TortoiseUtils; - public class Homework01 { // 'How to do homework: @@ -24,54 +22,54 @@ public class Homework01 @Test public void numbersDoNotNeedQuotes() { - Assert.assertEquals(42, ____); + Assert.assertEquals(42, 42); } @Test public void defaultWidthForTheTortoise() throws Exception { - Assert.assertEquals(Tortoise.getPenWidth(), ____); + Assert.assertEquals(Tortoise.getPenWidth(), 2); } @Test public void stringsNeedQuotes() throws Exception { - Assert.assertEquals("Green", ___); + Assert.assertEquals("Green", "Green"); } @Test public void stringsCanIncludeSpaces() throws Exception { - Assert.assertEquals("This is a string", ___); + Assert.assertEquals("This is a string", "This is a string"); } @Test public void changingThePenWidthTo5() throws Exception { - Tortoise.setPenWidth(____); + Tortoise.setPenWidth(5); Assert.assertEquals(5, Tortoise.getPenWidth()); } @Test public void movingTheTortoise100Pixels() throws Exception { int start = Tortoise.getY(); - Tortoise.move(____); + Tortoise.move(100); Assert.assertEquals(Tortoise.getY(), start - 100); // 'Hint: make sure you read the name of this method } @Test public void theTortoiseTurns21() throws Exception { - Tortoise.turn(____); + Tortoise.turn(21); Assert.assertEquals(21.0, Tortoise.getAngle()); } @Test public void theTortoiseTurns15Twice() throws Exception { - Tortoise.turn(____); - Tortoise.turn(____); + Tortoise.turn(15); + Tortoise.turn(15); Assert.assertEquals(30.0, Tortoise.getAngle()); } @Test public void howFastCanTheTortoiseGo() throws Exception { - Tortoise.setSpeed(____); + Tortoise.setSpeed(10); Assert.assertEquals(Tortoise.getSpeed(), topSpeed); // 'Hint: Click SetSpeed then read the documentation on the left -----> } @@ -79,25 +77,25 @@ public void howFastCanTheTortoiseGo() throws Exception public void assigningVariables() throws Exception { int myFavoriteNumber = 101; - Assert.assertEquals(myFavoriteNumber, ____); + Assert.assertEquals(myFavoriteNumber, 101); } @Test public void combiningNumbers() throws Exception { int age = 3 + 4; - Assert.assertEquals(age, ____); + Assert.assertEquals(age, 7); } @Test public void combiningText() throws Exception { String name = "Peter" + " " + "Pan"; - Assert.assertEquals(name, ___); + Assert.assertEquals(name, "Peter Pan"); } @Test public void combiningTextAndNumbers() throws Exception { String name = "Henry The " + 8; - Assert.assertEquals(name, ___); + Assert.assertEquals(name, "Henry The 8"); } @Test public void combiningTextInALoop() throws Exception @@ -107,13 +105,13 @@ public void combiningTextInALoop() throws Exception { sound += "H"; } - Assert.assertEquals(sound, ___); + Assert.assertEquals(sound, "AHHH"); } @Test public void forLoopsEndAtTheEnd() throws Exception { String numbers = "# "; - for (int i = 1; i <= ____; i++) + for (int i = 1; i <= 5; i++) { numbers += i; preventInfiniteLoops(); @@ -124,7 +122,7 @@ public void forLoopsEndAtTheEnd() throws Exception public void forLoopsCanStartAnywhere() throws Exception { String answer = "Because "; - for (int i = ____; i <= 9; i++) + for (int i = 7; i <= 9; i++) { answer += i; preventInfiniteLoops(); @@ -136,7 +134,7 @@ public void forLoopsCanStartAnywhere() throws Exception public void forLoopsCanSkip() throws Exception { String numbers = "# "; - for (int i = 1; i <= 20; i += ____) + for (int i = 1; i <= 20; i += 2) { numbers = numbers + i + ","; preventInfiniteLoops(); @@ -147,7 +145,7 @@ public void forLoopsCanSkip() throws Exception public void forLoopsCanSkipUpAndDown() throws Exception { String numbers = "# "; - for (int i = 20; 0 < i && i <= 40; i += ____) + for (int i = 20; 0 < i && i <= 40; i += -3) { numbers = numbers + i + ","; preventInfiniteLoops(); @@ -158,7 +156,7 @@ public void forLoopsCanSkipUpAndDown() throws Exception public void forLoopsCanGoBackwards() throws Exception { String numbers = "Countdown: "; - for (int i = 9; i >= 1; i += ____) + for (int i = 9; i >= 1; i += -1) { numbers += i; preventInfiniteLoops(); From bf8081f8b0ba3d7f212dbfeea8ac4ef9f16a02a2 Mon Sep 17 00:00:00 2001 From: Matt Wimer Date: Wed, 19 Jun 2013 15:06:18 -0700 Subject: [PATCH 10/13] drawn house-daniel/reeder --- .../recipes/Houses.java | 40 ++++++++++--------- 1 file changed, 22 insertions(+), 18 deletions(-) diff --git a/TeachingKidsProgramming/src/org/teachingkidsprogramming/recipes/Houses.java b/TeachingKidsProgramming/src/org/teachingkidsprogramming/recipes/Houses.java index 16c8cb93..cdad2c9f 100644 --- a/TeachingKidsProgramming/src/org/teachingkidsprogramming/recipes/Houses.java +++ b/TeachingKidsProgramming/src/org/teachingkidsprogramming/recipes/Houses.java @@ -1,26 +1,30 @@ package org.teachingkidsprogramming.recipes; +import org.teachingextensions.logo.Colors; +import org.teachingextensions.logo.Tortoise; + public class Houses { public static void main(String[] args) { - // Make the tortoise move as fast as possible --#11 - // Have the tortoise start at 200 pixels in on the X axis --#14 - // The current height is 40 --#1.2 - // drawHouse (recipe below) --#9 - // ------------- Recipe for drawHouse --#9 - // Change the color of the line the tortoise draws to lightGray --#15 - // Move the tortoise the height of a house --#1.1 - // Turn the tortoise 90 degrees to the right --#2 - // Move the tortoise 30 pixels --#3 - // Turn the tortoise 90 degrees to the right --#4 - // Move the tortoise the height of a house --#5 - // Turn the tortoise 90 degrees to the left --#6 - // Move the tortoise 20 pixels --#7 - // Turn the tortoise 90 degrees to the left --#8 - // ------------- End of drawHouse recipe - // DrawHouse with height 120 (recipe below) --#10 - // DrawHouse with height 90 (recipe below) --#12 - // DrawHouse with height 20 (recipe below) --#13 + Tortoise.setSpeed(10); + Tortoise.setX(200); + int height = 40; + drawHouse(height); + drawHouse(120); + drawHouse(90); + drawHouse(20); + } + private static void drawHouse(int height) + { + Tortoise.setPenColor(Colors.Grays.LightGray); + Tortoise.move(height); + Tortoise.turn(90); + Tortoise.move(30); + Tortoise.turn(90); + Tortoise.move(height); + Tortoise.turn(-90); + Tortoise.move(20); + Tortoise.turn(-90); } } From 75241c1c3538b1764a0e1513de2260963d2b76bd Mon Sep 17 00:00:00 2001 From: Matt Wimer Date: Wed, 19 Jun 2013 15:48:35 -0700 Subject: [PATCH 11/13] mavericks buildings-reeder/Daniel --- .../recipes/Houses.java | 35 ++++++++++++++++--- 1 file changed, 31 insertions(+), 4 deletions(-) diff --git a/TeachingKidsProgramming/src/org/teachingkidsprogramming/recipes/Houses.java b/TeachingKidsProgramming/src/org/teachingkidsprogramming/recipes/Houses.java index cdad2c9f..feb54f23 100644 --- a/TeachingKidsProgramming/src/org/teachingkidsprogramming/recipes/Houses.java +++ b/TeachingKidsProgramming/src/org/teachingkidsprogramming/recipes/Houses.java @@ -19,12 +19,39 @@ private static void drawHouse(int height) { Tortoise.setPenColor(Colors.Grays.LightGray); Tortoise.move(height); - Tortoise.turn(90); - Tortoise.move(30); - Tortoise.turn(90); + // flatRoof(); + //amittaisRoof(); + //MavericksRoof + mavericksRoof(); + Tortoise.turn(-90); Tortoise.move(height); Tortoise.turn(-90); Tortoise.move(20); Tortoise.turn(-90); } -} + private static void mavericksRoof() + { + Tortoise.turn(-90); + Tortoise.move(10); + Tortoise.turn(90 + 45); + Tortoise.move(50); + Tortoise.turn(90); + Tortoise.move(50); + Tortoise.turn(90 + 45); + Tortoise.move(10); + } + private static void amittaisRoof() + { + Tortoise.turn(45); + Tortoise.move(10); + Tortoise.turn(90); + Tortoise.move(10); + Tortoise.turn(45); + } + private static void flatRoof() + { + Tortoise.turn(90); + Tortoise.move(30); + Tortoise.turn(90); + } +} \ No newline at end of file From e08bb03637e35d258293c5e1aa699d90b3f096df Mon Sep 17 00:00:00 2001 From: Matt Wimer Date: Wed, 19 Jun 2013 16:05:32 -0700 Subject: [PATCH 12/13] quiz in progress- Daniel/Reeder --- .../recipes/quizzes/HousesQuiz.java | 23 +++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/TeachingKidsProgramming/src/org/teachingkidsprogramming/recipes/quizzes/HousesQuiz.java b/TeachingKidsProgramming/src/org/teachingkidsprogramming/recipes/quizzes/HousesQuiz.java index 5939a3b5..74f70f2b 100644 --- a/TeachingKidsProgramming/src/org/teachingkidsprogramming/recipes/quizzes/HousesQuiz.java +++ b/TeachingKidsProgramming/src/org/teachingkidsprogramming/recipes/quizzes/HousesQuiz.java @@ -1,5 +1,6 @@ package org.teachingkidsprogramming.recipes.quizzes; +import org.teachingextensions.logo.Tortoise; import org.teachingkidsprogramming.recipes.quizzes.graders.HousesQuizGrader; public class HousesQuiz extends org.teachingkidsprogramming.recipes.quizzes.graders.HousesQuiz @@ -7,21 +8,43 @@ public class HousesQuiz extends org.teachingkidsprogramming.recipes.quizzes.grad public void question1() { // The current length is 7 + length = 7; } // // Question2 // Create a method called medium // that sets the current length to 21 + @Override + public void medium() + { + // TODO Auto-generated method stub + super.medium(); + length = 21; + } // // // Question3 // Create a method called large // that sets the current length to 63 + @Override + public void large() + { + // TODO Auto-generated method stub + super.large(); + length = 63; + } // // // Question4 // Create a method called moveTheLength // that moves the Tortoise the current length + @Override + public void moveTheLength() + { + // TODO Auto-generated method stub + super.moveTheLength(); + Tortoise.move(21); + } // // // Question5 From 0c6ec3cf04751e172b4fddb43535ab71e82ede37 Mon Sep 17 00:00:00 2001 From: Matt Wimer Date: Wed, 19 Jun 2013 16:12:36 -0700 Subject: [PATCH 13/13] finished houses quiz- Daniel/Reeder --- .../recipes/quizzes/HousesQuiz.java | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/TeachingKidsProgramming/src/org/teachingkidsprogramming/recipes/quizzes/HousesQuiz.java b/TeachingKidsProgramming/src/org/teachingkidsprogramming/recipes/quizzes/HousesQuiz.java index 74f70f2b..4d8d2689 100644 --- a/TeachingKidsProgramming/src/org/teachingkidsprogramming/recipes/quizzes/HousesQuiz.java +++ b/TeachingKidsProgramming/src/org/teachingkidsprogramming/recipes/quizzes/HousesQuiz.java @@ -43,18 +43,33 @@ public void moveTheLength() { // TODO Auto-generated method stub super.moveTheLength(); - Tortoise.move(21); + Tortoise.move(length); } // // // Question5 // Create a method called turnTheCorner // that turns the Tortoise 1/3 of 360 degrees to the left + @Override + public void turnTheCorner() + { + // TODO Auto-generated method stub + super.turnTheCorner(); + Tortoise.turn(360 / -3); + } // // // Question6 // Create a method called drawASide // that calls moveTheLength and turnTheCorner + @Override + public void drawASide() + { + // TODO Auto-generated method stub + super.drawASide(); + moveTheLength(); + turnTheCorner(); + } // public static void main(String[] args) {