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_Prakt3/src/swa/prakt3/ArithmeticVariable.java | |
| download | Studium-master.tar.gz Studium-master.tar.bz2 | |
Diffstat (limited to 'Master/Software Architektur/SWA_Prakt3/src/swa/prakt3/ArithmeticVariable.java')
| -rwxr-xr-x | Master/Software Architektur/SWA_Prakt3/src/swa/prakt3/ArithmeticVariable.java | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/Master/Software Architektur/SWA_Prakt3/src/swa/prakt3/ArithmeticVariable.java b/Master/Software Architektur/SWA_Prakt3/src/swa/prakt3/ArithmeticVariable.java new file mode 100755 index 0000000..943e7de --- /dev/null +++ b/Master/Software Architektur/SWA_Prakt3/src/swa/prakt3/ArithmeticVariable.java @@ -0,0 +1,24 @@ +package swa.prakt3;
+
+public class ArithmeticVariable extends ArithmeticExpression {
+ private String name;
+ private Number value;
+
+ public ArithmeticVariable(String name,Number value) {
+ this.name = name;
+ this.value = value;
+ this.type = ExprType.VAR;
+ }
+
+ public String getName() {
+ return name;
+ }
+ public Number getValue() {
+ return value;
+ }
+ @Override
+ public Number accept(Visitor v, Iterator it) {
+ this.v=v;
+ return v.visit(this);
+ }
+}
|
