Skip to content

Commit c5239f2

Browse files
committed
added to DeepDive06 w/Samantha
1 parent d5f9857 commit c5239f2

File tree

2 files changed

+34
-5
lines changed

2 files changed

+34
-5
lines changed
0 Bytes
Binary file not shown.

TeachingKidsProgramming/src/org/teachingkidsprogramming/section06modelviewcontroller/DeepDive06ModelViewController.java

Lines changed: 34 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ public class DeepDive06ModelViewController
2222
// Do not change anything except the blank (___)
2323
//
2424
// concepts:
25-
// string concatenation
25+
// string concatenation, including int-> string conversions
2626
// MVC
2727
@Test
2828
public void stringsCanBeArrays() throws Exception
@@ -32,14 +32,43 @@ public void stringsCanBeArrays() throws Exception
3232
Assert.assertEquals("happy baby", words);
3333
}
3434
@Test
35-
public void canConcatenateVariables() throws Exception
35+
public void trashtalkingFlorida() throws Exception
3636
{
37-
//create a variable called words which equals "is to"
38-
//create a variable called analogy which equals "Florida " + words + " America as appendix " + words + " body"
39-
String words = "is to";
37+
String compareThis = "is to";
4038
String analogy = "Florida " + ___ + " America as appendix " + ___ + " body";
4139
Assert.assertEquals("Florida is to America as appendix is to body", analogy);
4240
}
41+
@Test
42+
public void sardinesFlyCoach() throws Exception
43+
{
44+
String fishReference = "The sardines were";
45+
String airplaneStress = "the coach section of a 747.";
46+
String analogy = fishReference + " packed as tight as " + airplaneStress;
47+
Assert.assertEquals("The sardines were packed as tight as the coach section of a 747.", ___);
48+
}
49+
@Test
50+
public void sanityProblems() throws Exception
51+
{
52+
String selfDeprecation = "The nerds who made this were";
53+
String anAppleADay = "the doctors who complimented their mental stability.";
54+
String analogy = selfDeprecation + " as sarcastic as " + anAppleADay;
55+
Assert.assertEquals(___, analogy);
56+
}
57+
@Test
58+
public void skydivingFrenchKings() throws Exception
59+
{
60+
String compareThis = ___;
61+
String analogy = "Skydiving " + compareThis + " sensible as Louis XVI " + compareThis + " leadership";
62+
Assert.assertEquals("Skydiving is to sensible as Louis XVI is to leadership", analogy);
63+
}
64+
@Test
65+
public void infiniteB() throws Exception
66+
{
67+
String infinite = "B";
68+
String analogy = "The " + ___ + " in " + ___ + "enoît " + ___ + ". Mandelbrot stands for " + ___ + "enoît "
69+
+ ___ + ". Mandelbrot.";
70+
Assert.assertEquals("The B in Benoît B. Mandelbrot stands for Benoît B. Mandelbrot.", analogy);
71+
}
4372
/**
4473
* Ignore the following, It's needed to run the homework
4574
*

0 commit comments

Comments
 (0)