瀏覽代碼

basic arithmetic

Trinh Tong 6 年之前
父節點
當前提交
d2dd8f1195
共有 1 個檔案被更改,包括 4 行新增4 行删除
  1. 4
    4
      src/main/java/rocks/zipcode/calcskin/CalcEngine.java

+ 4
- 4
src/main/java/rocks/zipcode/calcskin/CalcEngine.java 查看文件

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