Bläddra i källkod

BlueJ Conversion

Kr Younger 6 år sedan
förälder
incheckning
3500fdb046

+ 2
- 1
.gitignore Visa fil

@@ -3,4 +3,5 @@
3 3
 .classpath
4 4
 #.project
5 5
 .settings
6
-.idea/
6
+.idea/
7
+.class

+ 0
- 16
ChapterOneMicro.iml Visa fil

@@ -1,16 +0,0 @@
1
-<?xml version="1.0" encoding="UTF-8"?>
2
-<module org.jetbrains.idea.maven.project.MavenProjectsManager.isMavenModule="true" type="JAVA_MODULE" version="4">
3
-  <component name="NewModuleRootManager" LANGUAGE_LEVEL="JDK_1_8">
4
-    <output url="file://$MODULE_DIR$/target/classes" />
5
-    <output-test url="file://$MODULE_DIR$/target/test-classes" />
6
-    <content url="file://$MODULE_DIR$">
7
-      <sourceFolder url="file://$MODULE_DIR$/src/main/java" isTestSource="false" />
8
-      <sourceFolder url="file://$MODULE_DIR$/src/test/java" isTestSource="true" />
9
-      <excludeFolder url="file://$MODULE_DIR$/target" />
10
-    </content>
11
-    <orderEntry type="inheritedJdk" />
12
-    <orderEntry type="sourceFolder" forTests="false" />
13
-    <orderEntry type="library" scope="TEST" name="Maven: junit:junit:4.12" level="project" />
14
-    <orderEntry type="library" scope="TEST" name="Maven: org.hamcrest:hamcrest-core:1.3" level="project" />
15
-  </component>
16
-</module>

Binär
Method Fundamentals/MathUtilities.class Visa fil


+ 82
- 0
Method Fundamentals/MathUtilities.ctxt Visa fil

@@ -0,0 +1,82 @@
1
+#BlueJ class context
2
+comment0.target=MathUtilities
3
+comment0.text=\n\ Created\ by\ dan\ on\ 6/14/17.\n
4
+comment1.params=baseValue\ difference
5
+comment1.target=java.lang.Integer\ add(int,\ int)
6
+comment1.text=\n\ @param\ baseValue\ \ starting\ value\n\ @param\ difference\ value\ to\ add\ to\ starting\ value\n\ @return\ sum\ of\ `baseValue`\ and\ `difference`\n
7
+comment10.params=baseValue\ difference
8
+comment10.target=java.lang.Byte\ subtract(byte,\ byte)
9
+comment10.text=\n\ @param\ baseValue\ \ starting\ value\n\ @param\ difference\ value\ to\ subtract\ from\ starting\ value\n\ @return\ difference\ between\ `baseValue`\ and\ `difference`\n
10
+comment11.params=baseValue\ difference
11
+comment11.target=java.lang.Float\ subtract(float,\ float)
12
+comment11.text=\n\ @param\ baseValue\ \ starting\ value\n\ @param\ difference\ value\ to\ subtract\ from\ starting\ value\n\ @return\ difference\ between\ `baseValue`\ and\ `difference`\n
13
+comment12.params=baseValue\ difference
14
+comment12.target=java.lang.Double\ subtract(double,\ double)
15
+comment12.text=\n\ @param\ baseValue\ \ starting\ value\n\ @param\ difference\ value\ to\ subtract\ from\ starting\ value\n\ @return\ difference\ between\ `baseValue`\ and\ `difference`\n
16
+comment13.params=dividend\ divisor
17
+comment13.target=java.lang.Integer\ divide(int,\ int)
18
+comment13.text=\n\ @param\ dividend\ value\ to\ be\ divided\n\ @param\ divisor\ value\ to\ divide\ by\n\ @return\ division\ of\ `dividend`\ by\ `divisor\n
19
+comment14.params=dividend\ divisor
20
+comment14.target=java.lang.Long\ divide(long,\ long)
21
+comment14.text=\n\ @param\ dividend\ value\ to\ be\ divided\n\ @param\ divisor\ value\ to\ divide\ by\n\ @return\ division\ of\ `dividend`\ by\ `divisor\n
22
+comment15.params=dividend\ divisor
23
+comment15.target=java.lang.Short\ divide(short,\ short)
24
+comment15.text=\n\ @param\ dividend\ value\ to\ be\ divided\n\ @param\ divisor\ value\ to\ divide\ by\n\ @return\ division\ of\ `dividend`\ by\ `divisor\n
25
+comment16.params=dividend\ divisor
26
+comment16.target=java.lang.Byte\ divide(byte,\ byte)
27
+comment16.text=\n\ @param\ dividend\ value\ to\ be\ divided\n\ @param\ divisor\ value\ to\ divide\ by\n\ @return\ division\ of\ `dividend`\ by\ `divisor\n
28
+comment17.params=dividend\ divisor
29
+comment17.target=java.lang.Float\ divide(float,\ float)
30
+comment17.text=\n\ @param\ dividend\ value\ to\ be\ divided\n\ @param\ divisor\ value\ to\ divide\ by\n\ @return\ division\ of\ `dividend`\ by\ `divisor\n
31
+comment18.params=dividend\ divisor
32
+comment18.target=java.lang.Double\ divide(double,\ double)
33
+comment18.text=\n\ @param\ dividend\ value\ to\ be\ divided\n\ @param\ divisor\ value\ to\ divide\ by\n\ @return\ division\ of\ `dividend`\ by\ `divisor\n
34
+comment19.params=multiplicand\ multiplier
35
+comment19.target=java.lang.Integer\ multiply(int,\ int)
36
+comment19.text=\n\ @param\ multiplicand\ value\ to\ be\ multiplied\n\ @param\ multiplier\ value\ to\ multiply\ by\n\ @return\ product\ of\ `multiplicand`\ by\ `multiplier`\n
37
+comment2.params=baseValue\ difference
38
+comment2.target=java.lang.Long\ add(long,\ long)
39
+comment2.text=\n\ @param\ baseValue\ \ starting\ value\n\ @param\ difference\ value\ to\ add\ to\ starting\ value\n\ @return\ sum\ of\ `baseValue`\ and\ `difference`\n
40
+comment20.params=multiplicand\ multiplier
41
+comment20.target=java.lang.Long\ multiply(long,\ long)
42
+comment20.text=\n\ @param\ multiplicand\ value\ to\ be\ multiplied\n\ @param\ multiplier\ value\ to\ multiply\ by\n\ @return\ product\ of\ `multiplicand`\ by\ `multiplier`\n
43
+comment21.params=multiplicand\ multiplier
44
+comment21.target=java.lang.Short\ multiply(short,\ short)
45
+comment21.text=\n\ @param\ multiplicand\ value\ to\ be\ multiplied\n\ @param\ multiplier\ value\ to\ multiply\ by\n\ @return\ product\ of\ `multiplicand`\ by\ `multiplier`\n
46
+comment22.params=multiplicand\ multiplier
47
+comment22.target=java.lang.Byte\ multiply(byte,\ byte)
48
+comment22.text=\n\ @param\ multiplicand\ value\ to\ be\ multiplied\n\ @param\ multiplier\ value\ to\ multiply\ by\n\ @return\ product\ of\ `multiplicand`\ by\ `multiplier`\n
49
+comment23.params=multiplicand\ multiplier
50
+comment23.target=java.lang.Float\ multiply(float,\ float)
51
+comment23.text=\n\ @param\ multiplicand\ value\ to\ be\ multiplied\n\ @param\ multiplier\ value\ to\ multiply\ by\n\ @return\ product\ of\ `multiplicand`\ by\ `multiplier`\n
52
+comment24.params=multiplicand\ multiplier
53
+comment24.target=java.lang.Double\ multiply(double,\ double)
54
+comment24.text=\n\ @param\ multiplicand\ value\ to\ be\ multiplied\n\ @param\ multiplier\ value\ to\ multiply\ by\n\ @return\ product\ of\ `multiplicand`\ by\ `multiplier`\n
55
+comment25.params=
56
+comment25.target=java.lang.Boolean\ returnTrue()
57
+comment25.text=\n\ @return\ true\n
58
+comment26.params=
59
+comment26.target=java.lang.Boolean\ returnFalse()
60
+comment26.text=\n\ @return\ false\n
61
+comment3.params=baseValue\ difference
62
+comment3.target=java.lang.Short\ add(short,\ short)
63
+comment3.text=\n\ @param\ baseValue\ \ starting\ value\n\ @param\ difference\ value\ to\ add\ to\ starting\ value\n\ @return\ sum\ of\ `baseValue`\ and\ `difference`\n
64
+comment4.params=baseValue\ difference
65
+comment4.target=java.lang.Byte\ add(byte,\ byte)
66
+comment4.text=\n\ @param\ baseValue\ \ starting\ value\n\ @param\ difference\ value\ to\ add\ to\ starting\ value\n\ @return\ sum\ of\ `baseValue`\ and\ `difference`\n
67
+comment5.params=baseValue\ difference
68
+comment5.target=java.lang.Float\ add(float,\ float)
69
+comment5.text=\n\ @param\ baseValue\ \ starting\ value\n\ @param\ difference\ value\ to\ add\ to\ starting\ value\n\ @return\ sum\ of\ `baseValue`\ and\ `difference`\n
70
+comment6.params=baseValue\ difference
71
+comment6.target=java.lang.Double\ add(double,\ double)
72
+comment6.text=\n\ @param\ baseValue\ \ starting\ value\n\ @param\ difference\ value\ to\ add\ to\ starting\ value\n\ @return\ sum\ of\ `baseValue`\ and\ `difference`\n
73
+comment7.params=baseValue\ difference
74
+comment7.target=java.lang.Integer\ subtract(int,\ int)
75
+comment7.text=\n\ @param\ baseValue\ \ starting\ value\n\ @param\ difference\ value\ to\ subtract\ from\ starting\ value\n\ @return\ difference\ between\ `baseValue`\ and\ `difference`\n
76
+comment8.params=baseValue\ difference
77
+comment8.target=java.lang.Long\ subtract(long,\ long)
78
+comment8.text=\n\ @param\ baseValue\ \ starting\ value\n\ @param\ difference\ value\ to\ subtract\ from\ starting\ value\n\ @return\ difference\ between\ `baseValue`\ and\ `difference`\n
79
+comment9.params=baseValue\ difference
80
+comment9.target=java.lang.Short\ subtract(short,\ short)
81
+comment9.text=\n\ @param\ baseValue\ \ starting\ value\n\ @param\ difference\ value\ to\ subtract\ from\ starting\ value\n\ @return\ difference\ between\ `baseValue`\ and\ `difference`\n
82
+numComments=27

src/main/java/com/zipcodewilmington/danny_do_better_exercises/MathUtilities.java → Method Fundamentals/MathUtilities.java Visa fil

@@ -1,4 +1,4 @@
1
-package com.zipcodewilmington.danny_do_better_exercises;
1
+ 
2 2
 
3 3
 /**
4 4
  * Created by dan on 6/14/17.

Binär
Method Fundamentals/MathUtilitiesTest.class Visa fil


+ 65
- 0
Method Fundamentals/MathUtilitiesTest.ctxt Visa fil

@@ -0,0 +1,65 @@
1
+#BlueJ class context
2
+comment0.target=MathUtilitiesTest
3
+comment0.text=\n\ The\ test\ class\ MathUtilitiesTest.\n\n\ @author\ \ (your\ name)\n\ @version\ (a\ version\ number\ or\ a\ date)\n
4
+comment1.params=
5
+comment1.target=MathUtilitiesTest()
6
+comment1.text=\n\ Default\ constructor\ for\ test\ class\ MathUtilitiesTest\n
7
+comment10.params=
8
+comment10.target=void\ testSubtractions()
9
+comment11.params=
10
+comment11.target=void\ testSubtractions1()
11
+comment12.params=
12
+comment12.target=void\ testSubtractions2()
13
+comment13.params=
14
+comment13.target=void\ testSubtractions3()
15
+comment14.params=
16
+comment14.target=void\ testSubtractions4()
17
+comment15.params=
18
+comment15.target=void\ testSubtractions5()
19
+comment16.params=
20
+comment16.target=void\ testDivision()
21
+comment17.params=
22
+comment17.target=void\ testDivision1()
23
+comment18.params=
24
+comment18.target=void\ testDivision2()
25
+comment19.params=
26
+comment19.target=void\ testDivision3()
27
+comment2.params=
28
+comment2.target=void\ setUp()
29
+comment2.text=\n\ Sets\ up\ the\ test\ fixture.\n\n\ Called\ before\ every\ test\ case\ method.\n
30
+comment20.params=
31
+comment20.target=void\ testDivision4()
32
+comment21.params=
33
+comment21.target=void\ testDivision5()
34
+comment22.params=
35
+comment22.target=void\ testMultiplication()
36
+comment23.params=
37
+comment23.target=void\ testMultiplication1()
38
+comment24.params=
39
+comment24.target=void\ testMultiplication2()
40
+comment25.params=
41
+comment25.target=void\ testMultiplication3()
42
+comment26.params=
43
+comment26.target=void\ testMultiplication4()
44
+comment27.params=
45
+comment27.target=void\ testMultiplication5()
46
+comment28.params=
47
+comment28.target=void\ testReturnTrue()
48
+comment29.params=
49
+comment29.target=void\ testReturnFalse()
50
+comment3.params=
51
+comment3.target=void\ tearDown()
52
+comment3.text=\n\ Tears\ down\ the\ test\ fixture.\n\n\ Called\ after\ every\ test\ case\ method.\n
53
+comment4.params=
54
+comment4.target=void\ testAdditions()
55
+comment5.params=
56
+comment5.target=void\ testAdditions1()
57
+comment6.params=
58
+comment6.target=void\ testAdditions2()
59
+comment7.params=
60
+comment7.target=void\ testAdditions4()
61
+comment8.params=
62
+comment8.target=void\ testAdditions5()
63
+comment9.params=
64
+comment9.target=void\ testAdditions6()
65
+numComments=30

src/test/java/com/zipcodewilmington/danny_do_better_exercises/TestMathUtilities.java → Method Fundamentals/MathUtilitiesTest.java Visa fil

@@ -1,13 +1,49 @@
1
-package com.zipcodewilmington.danny_do_better_exercises;
2 1
 
3
-import org.junit.Test;
4 2
 
5 3
 import static org.junit.Assert.*;
4
+import org.junit.After;
5
+import org.junit.Before;
6
+import org.junit.Test;
7
+
6 8
 /**
7
- * Created by dan on 6/14/17.
9
+ * The test class MathUtilitiesTest.
10
+ *
11
+ * @author  (your name)
12
+ * @version (a version number or a date)
8 13
  */
9
-public class TestMathUtilities {
10
-    private static volatile MathUtilities primativeTypes = new MathUtilities();
14
+public class MathUtilitiesTest
15
+{
16
+    private MathUtilities primativeTypes;
17
+          
18
+    /**
19
+     * Default constructor for test class MathUtilitiesTest
20
+     */
21
+    public MathUtilitiesTest()
22
+    {
23
+        primativeTypes = new MathUtilities();
24
+    }
25
+
26
+    /**
27
+     * Sets up the test fixture.
28
+     *
29
+     * Called before every test case method.
30
+     */
31
+    @Before
32
+    public void setUp()
33
+    {
34
+    }
35
+
36
+    /**
37
+     * Tears down the test fixture.
38
+     *
39
+     * Called after every test case method.
40
+     */
41
+    @After
42
+    public void tearDown()
43
+    {
44
+    }
45
+
46
+
11 47
 
12 48
     @Test
13 49
     public void testAdditions() {
@@ -78,21 +114,6 @@ public class TestMathUtilities {
78 114
         assertEquals(expected,actual, 0);
79 115
     }
80 116
 
81
-
82
-
83
-
84
-
85
-
86
-
87
-
88
-
89
-
90
-
91
-
92
-
93
-
94
-
95
-
96 117
     @Test
97 118
     public void testSubtractions(){
98 119
         // : Given
@@ -160,19 +181,6 @@ public class TestMathUtilities {
160 181
         assertEquals(expectedDouble,actualDouble, 0);
161 182
     }
162 183
 
163
-
164
-
165
-
166
-
167
-
168
-
169
-
170
-
171
-
172
-
173
-
174
-
175
-
176 184
     @Test
177 185
     public void testDivision(){
178 186
         // : Given
@@ -241,23 +249,6 @@ public class TestMathUtilities {
241 249
         assertEquals(expectedDouble,actualDouble, 0);
242 250
     }
243 251
 
244
-
245
-
246
-
247
-
248
-
249
-
250
-
251
-
252
-
253
-
254
-
255
-
256
-
257
-
258
-
259
-
260
-
261 252
     @Test
262 253
     public void testMultiplication(){
263 254
         // : Given

Binär
Method Fundamentals/PredicateUtilities.class Visa fil


+ 16
- 0
Method Fundamentals/PredicateUtilities.ctxt Visa fil

@@ -0,0 +1,16 @@
1
+#BlueJ class context
2
+comment0.target=PredicateUtilities
3
+comment0.text=\n\ Created\ by\ dan\ on\ 6/14/17.\n
4
+comment1.params=x\ y
5
+comment1.target=java.lang.Boolean\ isGreaterThan(int,\ int)
6
+comment1.text=\n\ @param\ x\n\ @param\ y\n\ @return\ true\ if\ `x`\ is\ greater\ than\ `y`\n
7
+comment2.params=x\ y
8
+comment2.target=java.lang.Boolean\ isLessThan(int,\ int)
9
+comment2.text=\n\ @param\ x\n\ @param\ y\n\ @return\ true\ if\ `x`\ is\ less\ than\ `y`\n
10
+comment3.params=x\ y
11
+comment3.target=java.lang.Boolean\ isGreaterThanOrEqualTo(int,\ int)
12
+comment3.text=\n\ @param\ x\n\ @param\ y\n\ @return\ true\ if\ `x`\ is\ greater\ than\ or\ equal\ to\ `y`\n
13
+comment4.params=x\ y
14
+comment4.target=java.lang.Boolean\ isLessThanOrEqualTo(int,\ int)
15
+comment4.text=\n\ @param\ x\n\ @param\ y\n\ @return\ true\ if\ `x`\ is\ less\ than\ or\ equal\ to\ `y`\n
16
+numComments=5

src/main/java/com/zipcodewilmington/danny_do_better_exercises/PredicateUtilities.java → Method Fundamentals/PredicateUtilities.java Visa fil

@@ -1,4 +1,4 @@
1
-package com.zipcodewilmington.danny_do_better_exercises;
1
+ 
2 2
 
3 3
 /**
4 4
  * Created by dan on 6/14/17.

Binär
Method Fundamentals/PredicateUtilitiesTest.class Visa fil


+ 29
- 0
Method Fundamentals/PredicateUtilitiesTest.ctxt Visa fil

@@ -0,0 +1,29 @@
1
+#BlueJ class context
2
+comment0.target=PredicateUtilitiesTest
3
+comment0.text=\n\ The\ test\ class\ PredicateUtilitiesTest.\n\n\ @author\ \ (your\ name)\n\ @version\ (a\ version\ number\ or\ a\ date)\n
4
+comment1.params=
5
+comment1.target=PredicateUtilitiesTest()
6
+comment1.text=\n\ Default\ constructor\ for\ test\ class\ PredicateUtilitiesTest\n
7
+comment10.params=
8
+comment10.target=void\ testGreaterOrEqual1()
9
+comment11.params=
10
+comment11.target=void\ testGreaterOrEqual2()
11
+comment2.params=
12
+comment2.target=void\ setUp()
13
+comment2.text=\n\ Sets\ up\ the\ test\ fixture.\n\n\ Called\ before\ every\ test\ case\ method.\n
14
+comment3.params=
15
+comment3.target=void\ tearDown()
16
+comment3.text=\n\ Tears\ down\ the\ test\ fixture.\n\n\ Called\ after\ every\ test\ case\ method.\n
17
+comment4.params=
18
+comment4.target=void\ testGreaterThanTrue()
19
+comment5.params=
20
+comment5.target=void\ testGreaterThanFalse()
21
+comment6.params=
22
+comment6.target=void\ testLessThanTrue()
23
+comment7.params=
24
+comment7.target=void\ testLessThan1()
25
+comment8.params=
26
+comment8.target=void\ testLessOrEqual1()
27
+comment9.params=
28
+comment9.target=void\ testLessOrEqual2()
29
+numComments=12

src/test/java/com/zipcodewilmington/danny_do_better_exercises/TestPredicateUtilities.java → Method Fundamentals/PredicateUtilitiesTest.java Visa fil

@@ -1,14 +1,46 @@
1
-package com.zipcodewilmington.danny_do_better_exercises;
2 1
 
3
-import org.junit.Test;
4 2
 
5 3
 import static org.junit.Assert.*;
4
+import org.junit.After;
5
+import org.junit.Before;
6
+import org.junit.Test;
6 7
 
7 8
 /**
8
- * Created by dan on 6/14/17.
9
+ * The test class PredicateUtilitiesTest.
10
+ *
11
+ * @author  (your name)
12
+ * @version (a version number or a date)
9 13
  */
10
-public class TestPredicateUtilities {
11
-    private static volatile PredicateUtilities math = new PredicateUtilities();
14
+public class PredicateUtilitiesTest
15
+{
16
+    private PredicateUtilities math;
17
+    /**
18
+     * Default constructor for test class PredicateUtilitiesTest
19
+     */
20
+    public PredicateUtilitiesTest()
21
+    {
22
+        math = new PredicateUtilities();
23
+    }
24
+
25
+    /**
26
+     * Sets up the test fixture.
27
+     *
28
+     * Called before every test case method.
29
+     */
30
+    @Before
31
+    public void setUp()
32
+    {
33
+    }
34
+
35
+    /**
36
+     * Tears down the test fixture.
37
+     *
38
+     * Called after every test case method.
39
+     */
40
+    @After
41
+    public void tearDown()
42
+    {
43
+    }
12 44
 
13 45
     @Test
14 46
     public void testGreaterThanTrue() {

+ 107
- 0
Method Fundamentals/README.TXT Visa fil

@@ -0,0 +1,107 @@
1
+------------------------------------------------------------------------
2
+This is the project README file. Here, you should describe your project.
3
+Tell the reader (someone who does not know anything about this project)
4
+all he/she needs to know. The comments should usually include at least:
5
+------------------------------------------------------------------------
6
+
7
+PROJECT TITLE: Java Fundamentals
8
+PURPOSE OF PROJECT:
9
+VERSION or DATE:
10
+HOW TO START THIS PROJECT:
11
+AUTHORS:
12
+USER INSTRUCTIONS:
13
+
14
+From here on down, this file is in MarkDown format. (Look it up. Use the Github version.)
15
+# Java Fundamentals
16
+
17
+### **Objective:**
18
+* To complete the method stubs in each of the provided classes
19
+	* `MathUtilities`
20
+	* `PredicateUtilities`
21
+	* `StringUtilities`
22
+
23
+### **Purpose:**
24
+* To establish familiarity with
25
+    * [primitive data-types](http://cs.fit.edu/~ryan/java/language/java-data.html)
26
+    * [method signatures and return statements](http://www.homeandlearn.co.uk/java/java_methods.html)
27
+    * [String operations](https://www.tutorialspoint.com/java/java_strings.htm)
28
+    
29
+### **Classes to be completed:**
30
+* `MathUtilities`
31
+* `PredicateUtilities`
32
+* `StringUtilities`
33
+	
34
+### **Instructions:**
35
+
36
+1. Fork this Repository
37
+    * [fork](https://help.github.com/articles/fork-a-repo/) this repository to your personal github account 
38
+    * [clone](https://help.github.com/articles/cloning-a-repository/) **your** `forked` repository to your local machine.
39
+    * Complete steps 2 and 3  
40
+    * `git add` your changes to the list of your `commited` files.
41
+    * `git commit` your added files to the list of your `staged` files.
42
+    * `git push` your staged files to your remote repository.
43
+    * submit a `pull request` which compares Zipcoder `master` to your `master`.
44
+2. Begin by first ensuring the `main` method in your `ZipcodeRocks` class prints `"Zipcode Rocks!"` upon execution.  
45
+3. Complete each of the method stubs in each of the `main` classes provided.
46
+    * `main` classes are located in `src.main.java.com.zipcodewilmington.danny_do_better_exercises`
47
+    * There are comments above each method stub to describe the expected behavior.
48
+4. Upon completion, open and run the `TestSuite` class to ensure that all tests have 100% success.
49
+    * `TestSuite` is located in `src.test.java.com.zipcodewilmington.danny_do_better_exercises`
50
+
51
+## Predicate Utilities
52
+* A _predicate_ is a clause which states something about a subject. (_e.g., **is assigning**_ in _"Leon **is assigning** homework"_)
53
+* Ensure each of the test cases passes successfully in the class [TestPredicateUtilities](./src/test/java/com/zipcodewilmington/danny_do_better_exercises/TestPredicateUtilities.java) by completing each of the method stubs in the class [PredicateUtilities](./src/main/java/com/zipcodewilmington/danny_do_better_exercises/PredicateUtilities.java).
54
+* Method Stubs to be completed
55
+	* `boolean isGreaterThan(int x, int y)`
56
+	* `boolean isLessThan(int x, int y)`
57
+	* `boolean isGreaterThanOrEqualTo(int x, int y)`
58
+	* `boolean isLessThanOrEqualTo(int x, int y)`
59
+
60
+
61
+## Math Utilities
62
+* Ensure each of the test cases passes successfully in the class [TestMathUtilities](./src/test/java/com/zipcodewilmington/danny_do_better_exercises/TestMathUtilities.java) by completing each of the method stubs in the class [MathUtilities](./src/main/java/com/zipcodewilmington/danny_do_better_exercises/MathUtilities.java).
63
+* Method Stubs to be completed	
64
+	* `Integer add(int, int)`
65
+	* `Long add(long, long)`
66
+	* `Short add(short, short)`
67
+	* `Byte add(byte, byte)`
68
+	* `Float add(float, float)`
69
+	* `Double add(double, double)`
70
+	* `Integer subtract(int, int)`
71
+	* `Long subtract(long, long)`
72
+	* `Short subtract(short, short)`
73
+	* `Byte subtract(byte, byte)`
74
+	* `Float subtract(float, float)`
75
+	* `Double subtract(double, double)`
76
+	* `Integer divide(int, int)`
77
+	* `Long divide(long, long)`
78
+	* `Short divide(short, short)`
79
+	* `Byte divide(byte, byte)`
80
+	* `Float divide(float, float)`
81
+	* `Double divide(double, double)`
82
+	* `Integer multiply(int, int)`
83
+	* `Long multiply(long, long)`
84
+	* `Short multiply(short, short)`
85
+	* `Byte multiply(byte, byte)`
86
+	* `Float multiply(float, float)`
87
+	* `Double multiply(double, double)`
88
+	* `Boolean returnTrue`
89
+	* `Boolean returnFalse`
90
+
91
+
92
+## String Utilities
93
+* Ensure each of the test cases passes successfully in the class [TestStringUtilities](./src/test/java/com/zipcodewilmington/danny_do_better_exercises/TestStringUtilities.java) by completing each of the method stubs in the class [StringUtilities](./src/main/java/com/zipcodewilmington/danny_do_better_exercises/StringUtilities.java).
94
+* Method Stubs to be completed
95
+	* `String concatenation(String, String)`
96
+	* `String concatenation(int, String)`
97
+	* `String getPrefix(String)`
98
+	* `String getSuffix(String)`
99
+	* `Boolean compareTwoStrings(String)`
100
+	* `Character getMiddleCharacter(String)`
101
+	* `String getFirstWord(String)`
102
+	* `String getSecondWord(String)`
103
+	* `String reverse(String)`
104
+	
105
+	
106
+## Whats next?
107
+* The next lab can be found [here](https://github.com/Zipcoder/ZCW-MicroLabs-OOP-AliceAndBob).

Binär
Method Fundamentals/StringUtilities.class Visa fil


+ 34
- 0
Method Fundamentals/StringUtilities.ctxt Visa fil

@@ -0,0 +1,34 @@
1
+#BlueJ class context
2
+comment0.target=StringUtilities
3
+comment0.text=\n\ Created\ by\ dan\ on\ 6/14/17.\n
4
+comment1.params=
5
+comment1.target=java.lang.String\ getHelloWorld()
6
+comment1.text=\n\ @return\ `Hello\ World`\ as\ a\ string\n
7
+comment10.params=stringToReverse
8
+comment10.target=java.lang.String\ reverse(java.lang.String)
9
+comment10.text=\n\ @param\ stringToReverse\n\ @return\ an\ identical\ string\ with\ characters\ in\ reverse\ order.\n
10
+comment2.params=firstSegment\ secondSegment
11
+comment2.target=java.lang.String\ concatenation(java.lang.String,\ java.lang.String)
12
+comment2.text=\n\ @param\ firstSegment\ a\ string\ to\ be\ added\ to\n\ @param\ secondSegment\ a\ string\ to\ add\n\ @return\ the\ concatenation\ of\ two\ strings,\ `firstSegment`,\ and\ `secondSegment`\n
13
+comment3.params=firstSegment\ secondSegment
14
+comment3.target=java.lang.String\ concatenation(int,\ java.lang.String)
15
+comment3.text=\n\ @param\ firstSegment\ a\ string\ to\ be\ added\ to\n\ @param\ secondSegment\ a\ string\ to\ add\n\ @return\ the\ concatenation\ of\ an\ integer,\ `firstSegment`,\ and\ a\ String,\ `secondSegment`\n
16
+comment4.params=input
17
+comment4.target=java.lang.String\ getPrefix(java.lang.String)
18
+comment4.text=\n\ @param\ input\ a\ string\ to\ be\ manipulated\n\ @return\ the\ first\ 3\ characters\ of\ `input`\n
19
+comment5.params=input
20
+comment5.target=java.lang.String\ getSuffix(java.lang.String)
21
+comment5.text=\n\ @param\ input\ a\ string\ to\ be\ manipulated\n\ @return\ the\ last\ 3\ characters\ of\ `input`\n
22
+comment6.params=inputValue\ comparableValue
23
+comment6.target=java.lang.Boolean\ compareTwoStrings(java.lang.String,\ java.lang.String)
24
+comment6.text=\n\ @param\ inputValue\ the\ value\ to\ be\ compared\n\ @param\ comparableValue\ the\ value\ to\ be\ compared\ against\n\ @return\ the\ equivalence\ of\ two\ strings,\ `inputValue`\ and\ `comparableValue`\n
25
+comment7.params=inputValue
26
+comment7.target=java.lang.Character\ getMiddleCharacter(java.lang.String)
27
+comment7.text=\n\ @param\ inputValue\ the\ value\ input\ from\ user\n\ @return\ the\ middle\ character\ of\ `inputValue`\n
28
+comment8.params=spaceDelimitedString
29
+comment8.target=java.lang.String\ getFirstWord(java.lang.String)
30
+comment8.text=\n\ @param\ spaceDelimitedString\ a\ string,\ representative\ of\ a\ sentence,\ containing\ spaces\n\ @return\ the\ first\ sequence\ of\ characters\n
31
+comment9.params=spaceDelimitedString
32
+comment9.target=java.lang.String\ getSecondWord(java.lang.String)
33
+comment9.text=\n\ @param\ spaceDelimitedString\ a\ string\ delimited\ by\ spaces\n\ @return\ the\ second\ word\ of\ a\ string\ delimited\ by\ spaces.\n
34
+numComments=11

src/main/java/com/zipcodewilmington/danny_do_better_exercises/StringUtilities.java → Method Fundamentals/StringUtilities.java Visa fil

@@ -1,4 +1,4 @@
1
-package com.zipcodewilmington.danny_do_better_exercises;
1
+ 
2 2
 
3 3
 /**
4 4
  * Created by dan on 6/14/17.

Binär
Method Fundamentals/StringUtilitiesTest.class Visa fil


+ 37
- 0
Method Fundamentals/StringUtilitiesTest.ctxt Visa fil

@@ -0,0 +1,37 @@
1
+#BlueJ class context
2
+comment0.target=StringUtilitiesTest
3
+comment0.text=\n\ The\ test\ class\ StringUtilitiesTest.\n\n\ @author\ \ (your\ name)\n\ @version\ (a\ version\ number\ or\ a\ date)\n
4
+comment1.params=
5
+comment1.target=StringUtilitiesTest()
6
+comment1.text=\n\ Default\ constructor\ for\ test\ class\ StringUtilitiesTest\n
7
+comment10.params=
8
+comment10.target=void\ compareToTestNotEquals()
9
+comment11.params=
10
+comment11.target=void\ getTheMiddleChar1()
11
+comment12.params=
12
+comment12.target=void\ getTheMiddleChar2()
13
+comment13.params=
14
+comment13.target=void\ getTheFirstWord()
15
+comment14.params=
16
+comment14.target=void\ getTheSecondWord()
17
+comment15.params=
18
+comment15.target=void\ reverseThem()
19
+comment2.params=
20
+comment2.target=void\ setUp()
21
+comment2.text=\n\ Sets\ up\ the\ test\ fixture.\n\n\ Called\ before\ every\ test\ case\ method.\n
22
+comment3.params=
23
+comment3.target=void\ tearDown()
24
+comment3.text=\n\ Tears\ down\ the\ test\ fixture.\n\n\ Called\ after\ every\ test\ case\ method.\n
25
+comment4.params=
26
+comment4.target=void\ getHelloWorldTest()
27
+comment5.params=
28
+comment5.target=void\ concatenationStringTest()
29
+comment6.params=
30
+comment6.target=void\ concatenationStringAndIntegerTest()
31
+comment7.params=
32
+comment7.target=void\ substringBeginTest()
33
+comment8.params=
34
+comment8.target=void\ substringEndTest()
35
+comment9.params=
36
+comment9.target=void\ compareToTestEquals()
37
+numComments=16

src/test/java/com/zipcodewilmington/danny_do_better_exercises/TestStringUtilities.java → Method Fundamentals/StringUtilitiesTest.java Visa fil

@@ -1,13 +1,45 @@
1
-package com.zipcodewilmington.danny_do_better_exercises;
2 1
 
3
-import org.junit.Assert;
4
-import org.junit.Test;
2
+
5 3
 import static org.junit.Assert.*;
4
+import org.junit.After;
5
+import org.junit.Before;
6
+import org.junit.Test;
6 7
 
7 8
 /**
8
- * Created by dan on 6/14/17.
9
+ * The test class StringUtilitiesTest.
10
+ *
11
+ * @author  (your name)
12
+ * @version (a version number or a date)
9 13
  */
10
-public class TestStringUtilities {
14
+public class StringUtilitiesTest
15
+{
16
+    /**
17
+     * Default constructor for test class StringUtilitiesTest
18
+     */
19
+    public StringUtilitiesTest()
20
+    {
21
+    }
22
+
23
+    /**
24
+     * Sets up the test fixture.
25
+     *
26
+     * Called before every test case method.
27
+     */
28
+    @Before
29
+    public void setUp()
30
+    {
31
+    }
32
+
33
+    /**
34
+     * Tears down the test fixture.
35
+     *
36
+     * Called after every test case method.
37
+     */
38
+    @After
39
+    public void tearDown()
40
+    {
41
+    }
42
+    
11 43
     @Test
12 44
     public void getHelloWorldTest() {
13 45
         // : Given
@@ -115,7 +147,7 @@ public class TestStringUtilities {
115 147
         Character actual = StringUtilities.getMiddleCharacter(input);
116 148
 
117 149
         // : Then
118
-        Assert.assertEquals(expected.toString(), actual.toString());
150
+        assertEquals(expected.toString(), actual.toString());
119 151
     }
120 152
 
121 153
 
@@ -129,7 +161,7 @@ public class TestStringUtilities {
129 161
         Character actual = StringUtilities.getMiddleCharacter(input);
130 162
 
131 163
         // : Then
132
-        Assert.assertEquals(expected.toString(), actual.toString());
164
+        assertEquals(expected.toString(), actual.toString());
133 165
     }
134 166
 
135 167
 

+ 40
- 0
Method Fundamentals/package.bluej Visa fil

@@ -0,0 +1,40 @@
1
+#BlueJ package file
2
+editor.fx.0.height=722
3
+editor.fx.0.width=800
4
+editor.fx.0.x=560
5
+editor.fx.0.y=117
6
+objectbench.height=101
7
+objectbench.width=461
8
+package.divider.horizontal=0.6
9
+package.divider.vertical=0.8007380073800738
10
+package.editor.height=427
11
+package.editor.width=674
12
+package.editor.x=72
13
+package.editor.y=23
14
+package.frame.height=600
15
+package.frame.width=800
16
+package.numDependencies=0
17
+package.numTargets=2
18
+package.showExtends=true
19
+package.showUses=true
20
+project.charset=UTF-8
21
+readme.height=58
22
+readme.name=@README
23
+readme.width=47
24
+readme.x=10
25
+readme.y=10
26
+target1.association=MathUtilitiesTest
27
+target1.height=50
28
+target1.name=MathUtilities
29
+target1.showInterface=false
30
+target1.type=ClassTarget
31
+target1.width=100
32
+target1.x=70
33
+target1.y=90
34
+target2.height=50
35
+target2.name=MathUtilitiesTest
36
+target2.showInterface=false
37
+target2.type=UnitTestTargetJunit4
38
+target2.width=100
39
+target2.x=100
40
+target2.y=60

+ 0
- 35
pom.xml Visa fil

@@ -1,35 +0,0 @@
1
-<?xml version="1.0" encoding="UTF-8"?>
2
-<project xmlns="http://maven.apache.org/POM/4.0.0"
3
-         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
4
-         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
5
-    <modelVersion>4.0.0</modelVersion>
6
-
7
-    <groupId>zipcoder.io</groupId>
8
-    <artifactId>ChapterOneMicro</artifactId>
9
-    <version>1.0-SNAPSHOT</version>
10
-
11
-    <dependencies>
12
-        <dependency>
13
-            <groupId>junit</groupId>
14
-            <artifactId>junit</artifactId>
15
-            <version>4.12</version>
16
-            <scope>test</scope>
17
-        </dependency>
18
-    </dependencies>
19
-
20
-    <build>
21
-        <plugins>
22
-            <plugin>
23
-                <groupId>org.apache.maven.plugins</groupId>
24
-                <artifactId>maven-compiler-plugin</artifactId>
25
-                <version>3.6.0</version>
26
-                <configuration>
27
-                    <source>1.8</source>
28
-                    <target>1.8</target>
29
-                </configuration>
30
-            </plugin>
31
-        </plugins>
32
-    </build>
33
-
34
-
35
-</project>

+ 0
- 10
src/main/java/com/zipcodewilmington/danny_do_better_exercises/ZipcodeRocks.java Visa fil

@@ -1,10 +0,0 @@
1
-package com.zipcodewilmington.danny_do_better_exercises;
2
-
3
-/**
4
- * Created by leon on 2/5/18.
5
- */
6
-public class ZipcodeRocks {
7
-    public static void main(String[] args) {
8
-//         System.out.println("Zipcode Rocks!");
9
-    }
10
-}

+ 0
- 17
src/test/java/com/zipcodewilmington/danny_do_better_exercises/TestSuite.java Visa fil

@@ -1,17 +0,0 @@
1
-package com.zipcodewilmington.danny_do_better_exercises;
2
-
3
-import org.junit.runner.RunWith;
4
-import org.junit.runners.Suite;
5
-
6
-/**
7
- * Created by leon on 2/5/18.
8
- */
9
-@RunWith(Suite.class)
10
-
11
-@Suite.SuiteClasses({
12
-        TestPredicateUtilities.class,
13
-        TestMathUtilities.class,
14
-        TestStringUtilities.class,
15
-})
16
-public class TestSuite {
17
-}