From 33613a85afc4b1481367fbe92a17ee59c240250b Mon Sep 17 00:00:00 2001 From: Sven Eisenhauer Date: Fri, 10 Nov 2023 15:11:48 +0100 Subject: add new repo --- .../src/swa/prakt3/ArithmeticVariable.java | 24 ++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100755 Master/Software Architektur/SWA_Prakt3/src/swa/prakt3/ArithmeticVariable.java (limited to 'Master/Software Architektur/SWA_Prakt3/src/swa/prakt3/ArithmeticVariable.java') 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); + } +} -- cgit v1.2.3