Parcourir la source

updated readme

Leon il y a 6 ans
Parent
révision
235439f903

+ 60
- 2
README.md Voir le fichier

@@ -1,2 +1,60 @@
1
-# Java Fundamentals 
2
-The instructions for this lab can be found in the comments of the code of the project.
1
+# Java Fundamentals
2
+* Classes to be completed
3
+	* MathUtilities
4
+	* PredicateUtilities
5
+	* StringUtilities
6
+
7
+## Predicate Utilities
8
+* Ensure that each of the test cases 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).
9
+* A _predicate_ is a clause which states something about a subject. (_e.g., **is assigning**_ in _"Leon **is assigning** homework"_)
10
+
11
+* Method Stubs to be completed
12
+	* `boolean isGreaterThan(int x, int y)`
13
+	* `boolean isLessThan(int x, int y)`
14
+	* `boolean isGreaterThanOrEqualTo(int x, int y)`
15
+	* `boolean isLessThanOrEqualTo(int x, int y)`
16
+
17
+
18
+## Math Utilities
19
+* Ensure each of the test cases 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).
20
+* Method Stubs to be completed	
21
+	* `Integer add(int, int)`
22
+	* `Long add(long, long)`
23
+	* `Short add(short, short)`
24
+	* `Byte add(byte, byte)`
25
+	* `Float add(float, float)`
26
+	* `Double add(double, double)`
27
+	* `Integer subtract(int, int)`
28
+	* `Long subtract(long, long)`
29
+	* `Short subtract(short, short)`
30
+	* `Byte subtract(byte, byte)`
31
+	* `Float subtract(float, float)`
32
+	* `Double subtract(double, double)`
33
+	* `Integer divide(int, int)`
34
+	* `Long divide(long, long)`
35
+	* `Short divide(short, short)`
36
+	* `Byte divide(byte, byte)`
37
+	* `Float divide(float, float)`
38
+	* `Double divide(double, double)`
39
+	* `Integer multiply(int, int)`
40
+	* `Long multiply(long, long)`
41
+	* `Short multiply(short, short)`
42
+	* `Byte multiply(byte, byte)`
43
+	* `Float multiply(float, float)`
44
+	* `Double multiply(double, double)`
45
+	* `Boolean returnTrue`
46
+	* `Boolean returnFalse`
47
+
48
+
49
+## String Utilities
50
+* Ensure each of the test cases 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).
51
+* Method Stubs to be completed
52
+	* `String concatenation(String, String)`
53
+	* `String concatenation(int, String)`
54
+	* `String getPrefix(String)`
55
+	* `String getSuffix(String)`
56
+	* `String compareTwoStrings(String)`
57
+	* `Character getMiddleCharacter(String)`
58
+	* `String getFirstWord(String)`
59
+	* `String getSecondWord(String)`
60
+	* `String reverseTheTwo(String)`

src/main/java/com/zipcodewilmington/danny_do_better_exercises/PrimitiveTypes.java → src/main/java/com/zipcodewilmington/danny_do_better_exercises/MathUtilities.java Voir le fichier

@@ -3,7 +3,7 @@ package com.zipcodewilmington.danny_do_better_exercises;
3 3
 /**
4 4
  * Created by dan on 6/14/17.
5 5
  */
6
-public class PrimitiveTypes {
6
+public class MathUtilities {
7 7
 
8 8
     /**
9 9
      * @param baseValue  starting value

+ 6
- 0
src/main/java/com/zipcodewilmington/danny_do_better_exercises/StringUtilities.java Voir le fichier

@@ -4,6 +4,12 @@ package com.zipcodewilmington.danny_do_better_exercises;
4 4
  * Created by dan on 6/14/17.
5 5
  */
6 6
 public class StringUtilities {
7
+    /**
8
+     * @return `Hello World` as a string
9
+     */
10
+    public static String getHelloWorld() {
11
+        return null;
12
+    }
7 13
 
8 14
     /**
9 15
      * @param firstSegment a string to be added to

+ 0
- 20
src/test/java/com/zipcodewilmington/danny_do_better_exercises/TestHelloWorld.java Voir le fichier

@@ -1,20 +0,0 @@
1
-package com.zipcodewilmington.danny_do_better_exercises;
2
-
3
-import org.junit.Test;
4
-
5
-import static org.junit.Assert.assertEquals;
6
-
7
-/**
8
- * Created by leon on 2/1/18.
9
- */
10
-public class TestHelloWorld {
11
-    public static final HelloWorld helloWorld = new HelloWorld();
12
-
13
-    @Test
14
-    public void TestHelloWorld(){
15
-        String expected = "Hello World";
16
-        String actual = helloWorld.helloWorld();
17
-        assertEquals(expected,actual);
18
-    }
19
-
20
-}

src/test/java/com/zipcodewilmington/danny_do_better_exercises/TestPrimitiveTypes.java → src/test/java/com/zipcodewilmington/danny_do_better_exercises/TestMathUtilities.java Voir le fichier

@@ -6,8 +6,8 @@ import static org.junit.Assert.*;
6 6
 /**
7 7
  * Created by dan on 6/14/17.
8 8
  */
9
-public class TestPrimitiveTypes {
10
-    private static volatile PrimitiveTypes primativeTypes = new PrimitiveTypes();
9
+public class TestMathUtilities {
10
+    private static volatile MathUtilities primativeTypes = new MathUtilities();
11 11
 
12 12
     @Test
13 13
     public void testAdditions() {

+ 12
- 0
src/test/java/com/zipcodewilmington/danny_do_better_exercises/TestStringUtilities.java Voir le fichier

@@ -8,6 +8,18 @@ import static org.junit.Assert.*;
8 8
  * Created by dan on 6/14/17.
9 9
  */
10 10
 public class TestStringUtilities {
11
+    @Test
12
+    public void getHelloWorldTest() {
13
+        // : Given
14
+        String expected = "Hello World";
15
+
16
+        // : When
17
+        String actual = StringUtilities.getHelloWorld();
18
+
19
+        // : Then
20
+        assertEquals(expected, actual);
21
+
22
+    }
11 23
 
12 24
     @Test
13 25
     public void concatenationStringTest(){

+ 1
- 1
src/test/java/com/zipcodewilmington/danny_do_better_exercises/TestSuite.java Voir le fichier

@@ -11,7 +11,7 @@ import org.junit.runners.Suite;
11 11
 @Suite.SuiteClasses({
12 12
         TestHelloWorld.class,
13 13
         TestPredicateUtilities.class,
14
-        TestPrimitiveTypes.class,
14
+        TestMathUtilities.class,
15 15
         TestStringUtilities.class,
16 16
 })
17 17
 public class TestSuite {