parent
b6a9868ac4
commit
7c4ecb5260
@ -1,31 +0,0 @@
|
||||
package com.wpc;
|
||||
/* --- coding = utf-8 ---
|
||||
* @Time: 2020/8/6 18:34
|
||||
* @Author: 1807310509
|
||||
* @File: Arithmometer.java
|
||||
* @Software: IntelliJ IDEA
|
||||
*/
|
||||
|
||||
public class Arithmometer {
|
||||
private static double result;
|
||||
|
||||
public Arithmometer() {
|
||||
}
|
||||
|
||||
public static double calculator(Double num1,String sign,Double num2) {
|
||||
switch (sign) {
|
||||
case "+":
|
||||
result = num1 + num2;
|
||||
break;
|
||||
case "-":
|
||||
result = num1 - num2;
|
||||
break;
|
||||
case "*":
|
||||
result = num1 * num2;
|
||||
break;
|
||||
case "/":
|
||||
result = num1 / num2;
|
||||
}
|
||||
return result;
|
||||
}
|
||||
}
|
@ -1 +0,0 @@
|
||||
Hello
|
Loading…
Reference in new issue