Stwillia94 6 yıl önce
ebeveyn
işleme
e2c494010f

+ 11
- 4
src/main/java/rocks/zipcode/calcskin/CalcEngine.java Dosyayı Görüntüle

@@ -6,18 +6,25 @@ public class CalcEngine {
6 6
     }
7 7
 
8 8
     public double add(double v, double v1) {
9
-        return Double.NaN;
9
+
10
+        double sum = v + v1;
11
+        return sum;
10 12
     }
11 13
 
12 14
     public double subtract(double v, double v1) {
13
-        return Double.NaN;
15
+
16
+        double result = v - v1;
17
+        return result;
14 18
     }
15 19
 
16 20
     public double multiply(double v, double v1) {
17
-        return Double.NaN;
21
+
22
+        double result = v * v1;
23
+        return result;
18 24
     }
19 25
 
20 26
     public double divide(double v, double v1) {
21
-        return Double.NaN;
27
+        double result = v / v1;
28
+        return result;
22 29
     }
23 30
 }