summaryrefslogtreecommitdiffstats
path: root/Master/Software Architektur/SWA_Prakt3/src/swa/prakt3/ArithmeticVariable.java
diff options
context:
space:
mode:
authorSven Eisenhauer <sven@sven-eisenhauer.net>2023-11-10 15:11:48 +0100
committerSven Eisenhauer <sven@sven-eisenhauer.net>2023-11-10 15:11:48 +0100
commit33613a85afc4b1481367fbe92a17ee59c240250b (patch)
tree670b842326116b376b505ec2263878912fca97e2 /Master/Software Architektur/SWA_Prakt3/src/swa/prakt3/ArithmeticVariable.java
downloadStudium-33613a85afc4b1481367fbe92a17ee59c240250b.tar.gz
Studium-33613a85afc4b1481367fbe92a17ee59c240250b.tar.bz2
add new repoHEADmaster
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);
+ }
+}