Skip to content

Commit 11652eb

Browse files
committed
fixed BackgroundImage
1 parent c4baa84 commit 11652eb

4 files changed

Lines changed: 37 additions & 36 deletions

File tree

281 Bytes
Binary file not shown.

TeachingKidsProgramming/src/org/teachingkidsprogramming/section03ifs/HiLowQuiz.java

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -4,29 +4,29 @@
44

55
public class HiLowQuiz extends org.teachingkidsprogramming.recipes.quizzes.graders.HiLowQuiz
66
{
7+
@Override
78
public void question1()
89
{
9-
// if the Y position of the tortoise is 115
10-
//
11-
// turn the tortoise to the right 63 degrees
10+
// If the Y position of the tortoise is 115
11+
// Turn the tortoise to the right 63 degrees
1212
}
13+
@Override
1314
public void question2()
1415
{
15-
// if the X position of tortoise is less than Y position of tortoise
16-
//
17-
// turn the tortoise 54 degrees to the left
18-
//
19-
// otherwise turn the tortoise 22 degrees to the right
16+
// If the X position of tortoise is less than Y position of tortoise
17+
// Turn the tortoise 54 degrees to the left
18+
// Otherwise turn the tortoise 22 degrees to the right
2019
}
20+
@Override
2121
public void question3()
2222
{
23-
// display the message "elcomeway omehay!"
23+
// Display the message "elcomeway omehay!"
2424
}
25+
@Override
2526
public void question4()
2627
{
27-
// if the Y position of tortoise is greater than 50
28-
//
29-
// turn the tortoise 177 degrees to the left
28+
// If the Y position of tortoise is greater than 50
29+
// Turn the tortoise 177 degrees to the left
3030
}
3131
public static void main(String[] args)
3232
{

TeachingKidsProgramming/src/org/teachingkidsprogramming/section04mastery/BackgroundPhoto.java

Lines changed: 15 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -4,22 +4,23 @@
44

55
public class BackgroundPhoto
66
{
7+
@SuppressWarnings("unused")
78
public static void main(String[] args)
89
{
10+
// Set the current picture to this url "http://img2.timeinc.net/ew/dynamic/imgs/101110/sonny-cher_240.jpg" --#1.0
11+
// Set the background image to the current picture--#1.1
912
Tortoise.show();
10-
// Make the tortoise go as fast as possible --#3
11-
// Set the current picture to this url "http://img2.timeinc.net/ew/dynamic/imgs/101110/sonny-cher_240.jpg" --#7.1
12-
// Set the background image to the current picture--#7.2
13-
// Set the current side to 2 pixels long --#4.1
14-
// Do the following 75 times --#2.1
15-
// Set the current pen color to crimson --#8.1
16-
// Use the current pen color for the line the tortoise draws --#8.2
17-
// Increase the length of a side by 1 pixel --#5
18-
// Move the tortoise the length of the current side --#4.2
19-
// Set the X position of the tortoise to 555 pixels --#4.3
20-
// Set the Y position of the tortoise to 65 pixels --#4.4
21-
// Turn the tortoise 1/3rd of 360 degrees to the right --#1
22-
// Turn the tortoise 1 more degree --#6
23-
// Repeat --#2.2
13+
Tortoise.setSpeed(10);
14+
int side = 2;
15+
// Do the following 75 times --#7.1
16+
// Set the current pen color to crimson --#6.1
17+
// Use the current pen color for the line the tortoise draws --#6.2
18+
// Increase the length of a side by 1 pixel --#3.0
19+
// Move the tortoise the length of the current side --#3.1
20+
// Set the X position of the tortoise to 555 pixels --#2.0
21+
// Set the Y position of the tortoise to 65 pixels --#2.1
22+
// Turn the tortoise 1/3rd of 360 degrees to the right --#4
23+
// Turn the tortoise 1 more degree --#5
24+
// Repeat --#7.2
2425
}
2526
}

TeachingKidsProgramming/src/org/teachingkidsprogramming/section04mastery/PentagonCrazyQuiz.java

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -7,28 +7,28 @@ public class PentagonCrazyQuiz extends PentagonQuizAdapter
77
{
88
public void question1()
99
{
10-
// Question 1
11-
// createAStitch (recipe below)
12-
// ------------- Recipe for createAStitch
13-
// Move the tortoise 6 pixels
14-
// ------------- End of createAStitch recipe
10+
// Question 1
11+
// createAStitch (recipe below)
12+
// ------------- Recipe for createAStitch
13+
// Move the tortoise 6 pixels
14+
// ------------- End of createAStitch recipe
1515
}
1616
@Override
1717
public void question2()
1818
{
19-
// Do the following 76 times
20-
// Call sewAStitch
21-
// Repeat
19+
// Do the following 76 times
20+
// Call sewAStitch
21+
// Repeat
2222
}
2323
@Override
2424
public void question3()
2525
{
26-
// Add lime to the color wheel
26+
// Add lime to the color wheel
2727
}
2828
@Override
2929
public void question4()
3030
{
31-
// Add red to the color wheel
31+
// Add red to the color wheel
3232
}
3333
public static void main(String[] args)
3434
{

0 commit comments

Comments
 (0)