Nick Satinover 6 vuotta sitten
vanhempi
commit
e0b1f804d0

+ 2
- 0
src/main/java/rocks/zipcode/io/quiz4/generics/SortedGroup.java Näytä tiedosto

@@ -4,6 +4,8 @@ package rocks.zipcode.io.quiz4.generics;
4 4
  * @author leon on 18/12/2018.
5 5
  */
6 6
 public class SortedGroup<_> extends Group<_> {
7
+
8
+
7 9
     @Override
8 10
     public void insert(_ value) {
9 11
     }

+ 13
- 3
src/main/java/rocks/zipcode/io/quiz4/objectorientation/PalindromeObject.java Näytä tiedosto

@@ -1,21 +1,31 @@
1 1
 package rocks.zipcode.io.quiz4.objectorientation;
2 2
 
3
+import rocks.zipcode.io.quiz4.fundamentals.PalindromeEvaluator;
4
+
3 5
 /**
4 6
  * @author leon on 18/12/2018.
5 7
  */
6 8
 public class PalindromeObject {
9
+    PalindromeEvaluator evaluator;
10
+    String object;
11
+
7 12
     public PalindromeObject(String input) {
13
+        this.object = input;
14
+        evaluator = new PalindromeEvaluator();
8 15
     }
9 16
 
10 17
     public String[] getAllPalindromes(){
11
-        return null;
18
+
19
+        return evaluator.getAllPalindromes(object);
12 20
     }
13 21
 
14 22
     public Boolean isPalindrome(){
15
-        return null;
23
+
24
+        return evaluator.isPalindrome(object);
16 25
     }
17 26
 
18 27
     public String reverseString(){
19
-        return null;
28
+
29
+        return evaluator.reverseString(object);
20 30
     }
21 31
 }