|
@@ -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
|
}
|