diff options
Diffstat (limited to 'oop/02-non-static-methods/Calculator.java')
| -rw-r--r-- | oop/02-non-static-methods/Calculator.java | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/oop/02-non-static-methods/Calculator.java b/oop/02-non-static-methods/Calculator.java new file mode 100644 index 0000000..ecc7234 --- /dev/null +++ b/oop/02-non-static-methods/Calculator.java @@ -0,0 +1,15 @@ + +public class Calculator { + + public int add(int a, int b) { + return a + b; + } + + public int subtract(int a, int b) { + return a - b; + } + + public double convertFromC2F(double cTemp) { + return cTemp*180/100 + 32.0; + } +} |
