Base Abstract Class for Operations

master
sgoudham 4 years ago
parent 5642dbd575
commit 2af4b69da3
No known key found for this signature in database
GPG Key ID: EF51A29A50FB754C

@ -0,0 +1,43 @@
public abstract class CalculateBase {
private double leftVal;
private double rightVal;
private double result;
public abstract void calculate();
public CalculateBase() {}
public CalculateBase(double leftVal, double rightVal) {
this.leftVal = leftVal;
this.rightVal = rightVal;
}
// Getters and setters
public double getLeftVal() {
return leftVal;
}
public void setLeftVal(double leftVal) {
this.leftVal = leftVal;
}
public double getRightVal() {
return rightVal;
}
public void setRightVal(double rightVal) {
this.rightVal = rightVal;
}
public double getResult() {
return result;
}
public void setResult(double result) {
this.result = result;
}
}
Loading…
Cancel
Save