// Source code example for "A Practical Introduction // to Data Structures and Algorithm Analysis" // by Clifford A. Shaffer, Prentice Hall, 1998. // Copyright 1998 by Clifford A. Shaffer import java.io.*; // Driver class for Min Heap tests public class MinhMain { // Main routine for Min Heap tests public static void main(String args[]) throws IOException { int i, j; Assert.notFalse(args.length == 1, "Usage: heap "); int n = Integer.parseInt(args[0]); // Get heap size IElem[] A = new IElem[n]; // Declare some test arrays IElem[] B = new IElem[n]; IElem[] C = {new IElem(73), new IElem(6), new IElem(57), new IElem(88), new IElem(60), new IElem(34), new IElem(83), new IElem(72), new IElem(48), new IElem(85)}; MinHeap BH = new MinHeap(B, 0, 20); MinHeap Test = new MinHeap(C, 10, 10); Assert.notFalse(n<=20, "Heap size is too big"); for (i=0; i