package hw8; public class Homework8 { public static void main(String[] args) { BinaryTree tr = tree1(); System.out.println(evaluate(tr, tr.root())); System.out.println(expression(tr, tr.root())); } private static BinaryTree tree1() { LinkedBinaryTree T = new LinkedBinaryTree<>(); Position v = T.addRoot("+"); T.insertLeft(v, "3"); v = T.insertRight(v, "*"); T.insertRight(v, "7"); v = T.insertLeft(v, "+"); T.insertLeft(v, "4"); T.insertRight(v, "6"); return T; } public static int evaluate(BinaryTree T, Position v) { //return the integer that subtree at v evaluates to return -1; } public static String expression(BinaryTree T, Position v) { // return the expression corresponding to subtree at v return null; } }