diff options
| author | Sven Eisenhauer <sven@sven-eisenhauer.net> | 2023-11-10 15:11:48 +0100 |
|---|---|---|
| committer | Sven Eisenhauer <sven@sven-eisenhauer.net> | 2023-11-10 15:11:48 +0100 |
| commit | 33613a85afc4b1481367fbe92a17ee59c240250b (patch) | |
| tree | 670b842326116b376b505ec2263878912fca97e2 /Master/Software Architektur/SWA_Prakt1/src/net/sven_eisenhauer/swa_prakt1/ArithmeticOperator.java | |
| download | Studium-master.tar.gz Studium-master.tar.bz2 | |
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(")");
+ }
+}
|
