summaryrefslogtreecommitdiffstats
path: root/Master/Software Architektur/SWA_Prakt3/src/swa/prakt3/ArithmeticOperation.java
blob: fca2f9a7c2fca59b6123d29c0dc726e3dcddfb6d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
package swa.prakt3;

public abstract class ArithmeticOperation extends ArithmeticExpression{
	protected ArithmeticExpression operand1;
	protected ArithmeticExpression operand2;
	protected String operationSign;
	public ArithmeticOperation(ArithmeticExpression operand1
			,ArithmeticExpression operand2){
		this.operand1 = operand1;
		this.operand2 = operand2;
		this.type = ExprType.OPER;
	}
	public String getOperationSign() {
		return operationSign;
	}
	public ArithmeticExpression getLeftOperand() {
		return operand1;
	}
	public ArithmeticExpression getRightOperand() {
		return operand2;
	}
	@Override
	public Number accept(Visitor v, Iterator it) {
		this.v = v;
		return v.visit(this, it);
	}
	public abstract Number doOperation(Number op1, Number op2);
}