Skip to content

Commit 340850c

Browse files
committed
Added Pizza and Topping w/Jim
1 parent 79a244a commit 340850c

File tree

2 files changed

+19
-5
lines changed

2 files changed

+19
-5
lines changed
3.06 KB
Binary file not shown.

TeachingKidsProgramming/src/org/teachingkidsprogramming/section07events/DeepDive07Events.java

Lines changed: 19 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@
44

55
import org.junit.Assert;
66
import org.junit.Test;
7+
import org.teachingextensions.logo.Pizza;
8+
import org.teachingextensions.logo.Topping;
79
import org.teachingextensions.logo.Tortoise;
810
import org.teachingextensions.logo.Turtle;
911
import org.teachingextensions.logo.Turtle.Animals;
@@ -78,6 +80,17 @@ public void explodingTurtle() throws Exception
7880
this.donatello.setAnimal(Animals.ExplodedTurtle);
7981
Assert.assertTrue("The ninja is still alive!", ninja.isDead());
8082
}
83+
//fix comparitor
84+
@Test
85+
public void feedTheNinja() throws Exception
86+
{
87+
Tortoise michealangelo = new Tortoise();
88+
michealangelo.likesTopping(Topping.Pepperoni);
89+
Pizza pizza = new Pizza();
90+
pizza.addTopping(_________);
91+
boolean likedIt = michealangelo.eatPizza(pizza);
92+
Assert.assertTrue("Michealangelo barfs! Wrong pizza!", likedIt);
93+
}
8194
/**
8295
* Ignore the following, It's needed to run the homework
8396
*
@@ -91,12 +104,13 @@ public void explodingTurtle() throws Exception
91104
*
92105
*
93106
*/
94-
public boolean _____ = false;
95-
public boolean ______ = true;
96-
public String ___ = "You need to fill in the blank ___";
97-
public int ____ = 0;
98-
public Turtle _______ = new Turtle();
107+
public boolean _____ = false;
108+
public boolean ______ = true;
109+
public String ___ = "You need to fill in the blank ___";
110+
public int ____ = 0;
111+
public Turtle _______ = new Turtle();
99112
public Tortoise ________;
113+
public Topping _________ = Topping.NoTopping;
100114
public String ___()
101115
{
102116
return ___;

0 commit comments

Comments
 (0)