|
|
@@ -1,14 +1,15 @@
|
|
1
|
1
|
import java.util.regex.Matcher;
|
|
2
|
2
|
import java.util.regex.Pattern;
|
|
3
|
3
|
|
|
4
|
|
-public class Acronym {
|
|
|
4
|
+final class Acronym {
|
|
|
5
|
+
|
|
5
|
6
|
private final String acronym;
|
|
6
|
7
|
|
|
7
|
|
- public Acronym(String phrase) {
|
|
|
8
|
+ Acronym(String phrase) {
|
|
8
|
9
|
acronym = generateAcronym(phrase);
|
|
9
|
10
|
}
|
|
10
|
11
|
|
|
11
|
|
- public String get() {
|
|
|
12
|
+ String get() {
|
|
12
|
13
|
return acronym;
|
|
13
|
14
|
}
|
|
14
|
15
|
|
|
|
@@ -21,4 +22,5 @@ public class Acronym {
|
|
21
|
22
|
}
|
|
22
|
23
|
return b.toString().toUpperCase();
|
|
23
|
24
|
}
|
|
24
|
|
-}
|
|
|
25
|
+
|
|
|
26
|
+}
|