diff --git a/Rechner/src/Calculator.java b/Rechner/src/Calculator.java new file mode 100644 index 0000000..af9dec3 --- /dev/null +++ b/Rechner/src/Calculator.java @@ -0,0 +1,19 @@ + +public class Calculator { + + Node erzeugeBeispielBaum() { + + Node root = new Node(new Symbol("+")); + + root.left = new Node(new Symbol("3")); + + root.right = new Node(new Symbol("*")); + + root.right.left = new Node(new Symbol("5")); + + root.right.right = new Node(new Symbol("8")); + + return root; + } + +} diff --git a/Rechner/src/Test.java b/Rechner/src/Test.java new file mode 100644 index 0000000..9275860 --- /dev/null +++ b/Rechner/src/Test.java @@ -0,0 +1,11 @@ + +public class Test { + + public static void main(String[] args) { + + Calculator c = new Calculator(); + + Node root = c.erzeugeBeispielBaum(); + } + +}