import java.util.Scanner; public class TestBST { public static void main(String[] args) { Scanner in = new Scanner(System.in); BST x = new BST(); // Key = String, Value = String x.put("lion", "roar!!"); x.printBST(); x.put("dog", "woof"); x.printBST(); x.put("tiger", "roar!"); x.printBST(); x.put("cat", "miauw"); x.printBST(); x.put("horse", "brrr"); x.printBST(); x.put("ape", "uh-uh"); x.printBST(); x.put("cow", "moo"); x.printBST(); x.put("donkey", "i-oh"); x.printBST(); x.put("jackal", "a-uuh"); x.printBST(); x.put("owl", "uh-urh"); x.printBST(); x.put("man", "talks"); x.printBST(); x.put("zebra", "hrrrh"); x.printBST(); String k, v; while ( true ) { System.out.print("\n\nEnter a key to search on ==> "); k = in.next(); v = x.get( k ); System.out.println("Key = " + k + " ==> get() returns: " + v); } } }