/** Let's make a tree, and print it out. * There are 2 constructors we can call -- we can create a tree with a * single node, or with 2 existing trees and a new node , we can make a * bigger tree. */ import java.util.*; public class Driver { public static void main(String [] args) { Tree one = new Tree(new Item("1")); Tree two = new Tree(new Item("2")); Tree three = new Tree(new Item("3")); Tree four = new Tree(new Item("4")); Tree difference = new Tree(new Item("-"), one, two); Tree product = new Tree(new Item("*"), three, four); Tree sum = new Tree(new Item("+"), difference, product); // default printout (preorder shown vertically) System.out.println(sum); } }