package net.sven_eisenhauer.swa_prakt1; public abstract class ArithmeticOperator implements ArithmeticExpression{ protected ArithmeticExpression operand1; protected ArithmeticExpression operand2; protected String operandSign; public ArithmeticOperator(ArithmeticExpression operand1 ,ArithmeticExpression operand2){ this.operand1 = operand1; this.operand2 = operand2; } @Override public void print() { System.out.print("("); operand1.print(); System.out.print(operandSign); operand2.print(); System.out.print(")"); } }