Sfoglia il codice sorgente

Changed methods from public to package-private

Jack Mustacato 9 anni fa
parent
commit
4bc51dfee3

+ 3
- 3
exercises/triangle/.meta/src/reference/java/Triangle.java Vedi File

@@ -20,15 +20,15 @@ class Triangle {
20 20
         this.uniqueSides = getNumberOfUniqueSides();
21 21
     }
22 22
 
23
-    public boolean isEquilateral() {
23
+    boolean isEquilateral() {
24 24
         return uniqueSides == 1;
25 25
     }
26 26
 
27
-    public boolean isIsosceles() {
27
+    boolean isIsosceles() {
28 28
         return uniqueSides == 2;
29 29
     }
30 30
 
31
-    public boolean isScalene() {
31
+    boolean isScalene() {
32 32
         return uniqueSides == 3;
33 33
     }
34 34
 

+ 3
- 3
exercises/triangle/src/main/java/Triangle.java Vedi File

@@ -4,15 +4,15 @@ class Triangle {
4 4
         throw new UnsupportedOperationException("Delete this statement and write your own implementation.");
5 5
     }
6 6
 
7
-    public boolean isEquilateral() {
7
+    boolean isEquilateral() {
8 8
         throw new UnsupportedOperationException("Delete this statement and write your own implementation.");
9 9
     }
10 10
 
11
-    public boolean isIsosceles() {
11
+    boolean isIsosceles() {
12 12
         throw new UnsupportedOperationException("Delete this statement and write your own implementation.");
13 13
     }
14 14
 
15
-    public boolean isScalene() {
15
+    boolean isScalene() {
16 16
         throw new UnsupportedOperationException("Delete this statement and write your own implementation.");
17 17
     }
18 18