blob: efbf899a979db0327e421594bcaa72e845562121 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
|
package swa.prakt3;
public class ArithmeticAddition extends ArithmeticOperation {
public ArithmeticAddition(ArithmeticExpression operand1,
ArithmeticExpression operand2) {
super(operand1, operand2);
operationSign="+";
}
@Override
public Number doOperation(Number op1, Number op2) {
return op1.doubleValue() + op2.doubleValue() ;
}
}
|