Skip to content

Commit 9442c17

Browse files
committed
cleaning w/@samanthalangit
1 parent 0c31a5d commit 9442c17

34 files changed

Lines changed: 154 additions & 105 deletions

File tree

src/main/java/org/teachingkidsprogramming/recipes/completed/section00demos/QuickShape.java

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11,18 +11,18 @@ public static void main(String[] args) throws Exception
1111
{
1212
Tortoise.show();
1313
Tortoise.setX(150);
14-
//Tip: Use the Tortoise to draw shapes!
15-
//Draw a red square that is 50 pixels per side with a line that's 2 pixels thick
14+
// Tip: Use the Tortoise object to draw shapes!
15+
// Draw a red square that is 50 pixels per side with a line that's 2 pixels thick
1616
Tortoise.drawShape(4, PenColors.Reds.Red, 75, 4);
17-
//Draw a blue hexagon that is 65 pixels per side with a line that's 40 pixels thick
17+
// Draw a blue hexagon that is 65 pixels per side with a line that's 40 pixels thick
1818
Tortoise.setX(425);
1919
Tortoise.drawShape(6, PenColors.Blues.Blue, 65, 40);
2020
Tortoise.setX(250);
2121
Tortoise.setY(375);
2222
Random r = new Random();
2323
int sides = r.nextInt(10) + 1;
24-
//Draw a purple shape that is 50 pixel on each side with a line that's 10 pixels thick
24+
// Draw a purple shape that is 50 pixel on each side with a line that's 10 pixels thick
2525
Tortoise.drawShape(sides, PenColors.Purples.Purple, 50, 10);
2626
}
27-
//See your "work" at http://virtualproctor.tkpjava.org
27+
// See your "work" at http://virtualproctor.tkpjava.org
2828
}

src/main/java/org/teachingkidsprogramming/recipes/completed/section00demos/QuickTortoise.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ public class QuickTortoise
77
public static void main(String[] args) throws Exception
88
{
99
Tortoise.show();
10+
// Use the Tortoise object to draw a Tortoise!
1011
Tortoise.drawTortoise();
1112
}
1213
}

src/main/java/org/teachingkidsprogramming/recipes/completed/section01forloops/DeepDive01ForLoops.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
public class DeepDive01ForLoops
1111
{
1212
// How to do deep dive:
13-
// Step 1: Select the method name (numbersDoNotNeedQuotes on line 24) Press the Run Button
13+
// Step 1: Select the method name (numbersDoNotNeedQuotes on line 23) Press the Run Button
1414
// PC: Ctrl+F11
1515
// Mac: Command+fn+F11
1616
// Step 2: Read the name of the method that failed

src/main/java/org/teachingkidsprogramming/recipes/completed/section03ifs/HiLow.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ else if (guess < answer)
3939
MessageBox.showMessage("Try a higher number.");
4040
}
4141
}
42-
// If after 8 times they haven't guessed correctly then --#12
42+
// If after 8 times they haven't guessed correctly then --#12
4343
// Tell them they've lost the game --#11
4444
MessageBox.showMessage("You lost!");
4545
}

src/main/java/org/teachingkidsprogramming/recipes/completed/section04mastery/DeepDive04Mastery.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
public class DeepDive04Mastery
77
{
88
// How to do deep dive:
9-
// Step 1: Select the method name (theseNumbersCount on line 23) Press the Run Button
9+
// Step 1: Select the method name (theseNumbersCount on line 19) Press the Run Button
1010
// PC: Ctrl+F11
1111
// Mac: Command+fn+F11
1212
// Step 2: Read the name of the method that failed

src/main/java/org/teachingkidsprogramming/recipes/completed/section05recursion/DeepDive05Recursion.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
public class DeepDive05Recursion
1515
{
1616
// How to do deep dive:
17-
// Step 1: Select the method name (changeThePointerToAHand on line 29) Press the Run Button
17+
// Step 1: Select the method name (changeThePointerToAHand on line 27) Press the Run Button
1818
// PC: Ctrl+F11
1919
// Mac: Command+fn+F11
2020
// Step 2: Read the name of the method that failed

src/main/java/org/teachingkidsprogramming/recipes/completed/section05recursion/RecursiveSquare.java

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -10,34 +10,34 @@ public static void main(String[] args) throws Exception
1010
Tortoise.show();
1111
Tortoise.getBackgroundWindow().setBackground(PenColors.Greens.DarkGreen);
1212
Tortoise.setPenColor(PenColors.Yellows.Gold);
13-
//Set the speed to the fastest --#8
13+
// Set the speed to the fastest --#8
1414
Tortoise.setSpeed(10);
15-
//Set the length to 100.0 --#1.1
15+
// Set the length to 100.0 --#1.1
1616
double length = 100.0;
17-
//MakeASquare with the current length(recipe below) --#11.4
17+
// MakeASquare with the current length(recipe below) --#11.4
1818
makeASquare(length);
1919
}
2020
//
21-
//Create the makeASquare recipe --#11.1
21+
// Create the makeASquare recipe --#11.1
2222
private static void makeASquare(double length)
2323
{
24-
//If the current length is greater than 10 --#10.2
24+
// If the current length is greater than 10 --#10.2
2525
if (length > 10)
2626
{
27-
// Run the recipe moveToTheSquareStart with the current length --#4.3
27+
// Run the recipe moveToTheSquareStart with the current length --#4.3
2828
moveToTheSquareStart(length);
2929
//
30-
// Do the following 4 times --#7.1
30+
// Do the following 4 times --#7.1
3131
for (int i = 0; i < 4; i++)
3232
{
33-
// Move the Tortoise the current length
33+
// Move the Tortoise the current length
3434
Tortoise.move(length);
35-
// MakeASquare with the current length divided by 1.7 (recipe below)--#11.3
35+
// MakeASquare with the current length divided by 1.7 (recipe below)--#11.3
3636
makeASquare(length / 1.7);
37-
// If the current process count is less than 3 (HINT: use 'i') --#9
37+
// If the current process count is less than 3 (HINT: use 'i') --#9
3838
if (i < 3)
3939
{
40-
// Turn the tortoise 90 degrees to the right
40+
// Turn the tortoise 90 degrees to the right
4141
Tortoise.turn(90);
4242
//
4343
}
@@ -48,7 +48,7 @@ private static void makeASquare(double length)
4848
// Set the current length to the current length times two --#10.1
4949
length = length * 2;
5050
}
51-
//End of makeASquare recipe
51+
// End of makeASquare recipe
5252
}
5353
// Create the moveToTheSquareStart recipe --#4.1
5454
private static void moveToTheSquareStart(double length)

src/main/java/org/teachingkidsprogramming/recipes/completed/section06modelviewcontroller/AdLibs.java

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -6,21 +6,21 @@ public class AdLibs
66
{
77
public static void main(String[] args)
88
{
9-
//Ask the user to enter an adverb, save it as currentAdverb --#2
9+
// Ask the user to enter an adverb, save it as currentAdverb --#2
1010
String currentAdverb = MessageBox.askForTextInput("What is the adverb?");
11-
//Ask the user to enter a verb ending in '-ed', save it as currentEdVerb --#4
11+
// Ask the user to enter a verb ending in '-ed', save it as currentEdVerb --#4
1212
String currentEdVerb = MessageBox.askForTextInput("What is the -ed verb?");
13-
//Ask the user to enter a body part, save it as currentBodyPart --#6
13+
// Ask the user to enter a body part, save it as currentBodyPart --#6
1414
String currentBodyPart = MessageBox.askForTextInput("What is the body part?");
15-
//Set the value of the currentStory to the word "Today " --#1.2
15+
// Set the value of the currentStory to the word "Today " --#1.2
1616
String currentStory = "Today ";
17-
//Add the words "I woke " + currentAdverb + ". " to the currentStory --#3
17+
// Add the words "I woke " + currentAdverb + ". " to the currentStory --#3
1818
currentStory = currentStory + "I woke " + currentAdverb + ". ";
19-
//Add the words '"Then I " + currentEdVerb + " " to the currentStory --#5
19+
// Add the words '"Then I " + currentEdVerb + " " to the currentStory --#5
2020
currentStory = currentStory + "Then I " + currentEdVerb + " ";
21-
//Add the words "my " + currentBodyPart + ". " to the current story --#7
21+
// Add the words "my " + currentBodyPart + ". " to the current story --#7
2222
currentStory = currentStory + "my " + currentBodyPart + ". ";
23-
//Show the currentStory in a message box as a message --#1.1
23+
// Show the currentStory in a message box as a message --#1.1
2424
MessageBox.showMessage(currentStory);
2525
}
2626
}

src/main/java/org/teachingkidsprogramming/recipes/completed/section06modelviewcontroller/AdLibsQuiz.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,25 +9,25 @@ public class AdLibsQuiz extends AdLibsQuizAdapter
99
@Override
1010
public void question1(String letter1, String letter3)
1111
{
12-
//set current value of word1 to be letter1 + 'o' + letter3
12+
// Set current value of word1 to be letter1 + 'o' + letter3
1313
word1 = letter1 + "o" + letter3;
1414
}
1515
@Override
1616
public void question2(String letter1)
1717
{
18-
//add the letter1 to the end of word2
18+
// Add the letter1 to the end of word2
1919
word2 += letter1;
2020
}
2121
@Override
2222
public void question3(String templateText, Object model)
2323
{
24-
//use the parser to combine the template and the model as word3
24+
// Use the parser to combine the template and the model as word3
2525
word3 = Parser.parse(templateText, model);
2626
}
2727
@Override
2828
public void question4(Pieces pieces)
2929
{
30-
//set template4 to the template which does'g' + pieces.middle + 'e'
30+
// Set template4 to the template which does'g' + pieces.middle + 'e'
3131
template4 = "g{middle}e";
3232
}
3333
public static void main(String[] args)

src/main/java/org/teachingkidsprogramming/recipes/completed/section06modelviewcontroller/AdLibsRtfVariation.java renamed to src/main/java/org/teachingkidsprogramming/recipes/completed/section06modelviewcontroller/AdLibsRtf.java

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
import org.teachingextensions.logo.utils.MVCUtils.Parser;
55
import org.teachingextensions.logo.utils.MVCUtils.Viewer;
66

7-
public class AdLibsRtfVariation
7+
public class AdLibsRtf
88
{
99
public static class Words
1010
{
@@ -14,11 +14,17 @@ public static class Words
1414
}
1515
public static void main(String[] args)
1616
{
17+
// Create a new 'word' container to hold the words for your story --#1.1
1718
Words word = new Words();
19+
// Ask the user to enter an adverb, save it as currentAdverb --#2
1820
word.adverb = MessageBox.askForTextInput("What is the adverb?");
21+
// Ask the user to enter a verb ending in '-ed', save it as currentEdVerb --#3
1922
word.edVerb = MessageBox.askForTextInput("What is the -ed verb?");
23+
// Ask the user to enter a body part, save it as currentBodyPart --#4
2024
word.bodyPart = MessageBox.askForTextInput("What is the body part?");
25+
// Connect the words in the currentStory to an RTF file parser (use the Parser object) --#1.2
2126
String currentStory = Parser.parseRtfFile("view.rtf", word);
27+
// Display the currentStory in an RTF file (use the Viewer object) --#1.3
2228
Viewer.displayRtfFile(currentStory);
2329
}
2430
}

0 commit comments

Comments
 (0)