summaryrefslogtreecommitdiffstats
path: root/Master/Software Architektur/SWA_Prakt3/src/swa/prakt3/ArithmeticVariable.java
diff options
context:
space:
mode:
Diffstat (limited to 'Master/Software Architektur/SWA_Prakt3/src/swa/prakt3/ArithmeticVariable.java')
-rwxr-xr-xMaster/Software Architektur/SWA_Prakt3/src/swa/prakt3/ArithmeticVariable.java24
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);
+ }
+}