diff options
Diffstat (limited to 'Master/Software Architektur/SWA_Prakt1/src/net/sven_eisenhauer/swa_prakt1/ArithmeticOperator.java')
| -rw-r--r-- | Master/Software Architektur/SWA_Prakt1/src/net/sven_eisenhauer/swa_prakt1/ArithmeticOperator.java | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/Master/Software Architektur/SWA_Prakt1/src/net/sven_eisenhauer/swa_prakt1/ArithmeticOperator.java b/Master/Software Architektur/SWA_Prakt1/src/net/sven_eisenhauer/swa_prakt1/ArithmeticOperator.java new file mode 100644 index 0000000..b460fd0 --- /dev/null +++ b/Master/Software Architektur/SWA_Prakt1/src/net/sven_eisenhauer/swa_prakt1/ArithmeticOperator.java @@ -0,0 +1,20 @@ +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(")");
+ }
+}
|
