Update 18.3.2022

master
mittelni 2022-03-18 12:55:03 +01:00
parent d4b9dc25f2
commit 8a11dbf1b8
2 changed files with 30 additions and 0 deletions

View File

@ -0,0 +1,19 @@
public class Calculator {
Node<Symbol> erzeugeBeispielBaum() {
Node<Symbol> root = new Node<Symbol>(new Symbol("+"));
root.left = new Node<Symbol>(new Symbol("3"));
root.right = new Node<Symbol>(new Symbol("*"));
root.right.left = new Node<Symbol>(new Symbol("5"));
root.right.right = new Node<Symbol>(new Symbol("8"));
return root;
}
}

11
Rechner/src/Test.java Normal file
View File

@ -0,0 +1,11 @@
public class Test {
public static void main(String[] args) {
Calculator c = new Calculator();
Node<Symbol> root = c.erzeugeBeispielBaum();
}
}