Advertisement
leo_kor

Calculator Service

Apr 9th, 2020
364
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.58 KB | None | 0 0
  1. public class CalcService {
  2.     // declare input user input vars and operator
  3.     private double a;
  4.     private double b;
  5.     private String operator;
  6.  
  7.     // getters
  8.     public double getA() {
  9.         return this.a;
  10.     }
  11.     public double getB() {
  12.         return this.b;
  13.     }
  14.     public String getOperator() {
  15.         return this.operator;
  16.     }
  17.  
  18.     // setters
  19.     public void setA(double a) {
  20.         this.a = a;
  21.     }
  22.     public void setB(double b) {
  23.         this.b = b;
  24.     }
  25.     public void setOperator(String operator) {
  26.         this.operator = operator;
  27.     }
  28. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement