// Test delete public class TestProg6 { public static void main(String[] args) { AVLTree T = new AVLTree(new KeyComp()); T.insert(new KeyType("50"), new ValueType(2)); T.printTree(); System.out.println("============================="); T.insert(new KeyType("25"), new ValueType(12)); T.printTree(); System.out.println("============================="); T.insert(new KeyType("75"), new ValueType(12)); T.printTree(); System.out.println("============================="); T.insert(new KeyType("10"), new ValueType(12)); T.printTree(); System.out.println("============================="); T.insert(new KeyType("30"), new ValueType(12)); T.printTree(); System.out.println("============================="); T.insert(new KeyType("60"), new ValueType(12)); T.printTree(); System.out.println("============================="); T.insert(new KeyType("80"), new ValueType(12)); T.printTree(); System.out.println("============================="); T.insert(new KeyType("05"), new ValueType(12)); T.printTree(); System.out.println("============================="); T.insert(new KeyType("15"), new ValueType(12)); T.printTree(); System.out.println("============================="); T.insert(new KeyType("27"), new ValueType(12)); T.printTree(); System.out.println("============================="); T.insert(new KeyType("55"), new ValueType(12)); T.printTree(); System.out.println("============================="); T.insert(new KeyType("01"), new ValueType(12)); T.printTree(); System.out.println("============================="); System.out.println("============================="); System.out.println("REMOVE"); System.out.println("============================="); Entry p; p = T.find( new KeyType("75") ); if ( p == null ) { System.out.println(" Not found ??? "); } else { T.remove( p ); T.printTree(); System.out.println("============================="); } } }