import java.util.Scanner; public class TestPQ { public static void main(String[] args) { Scanner in = new Scanner(System.in); PrioQueue x = new PrioQueue(100); // Key = String, No Value x.insert("lion"); x.printPQ(); x.insert("dog"); x.printPQ(); x.insert("tiger"); x.printPQ(); x.insert("cat"); x.printPQ(); x.insert("horse"); x.printPQ(); x.insert("ape"); x.printPQ(); x.insert("cow"); x.printPQ(); x.insert("donkey"); x.printPQ(); x.insert("jackal"); x.printPQ(); x.insert("owl"); x.printPQ(); x.insert("man"); x.printPQ(); x.insert("zebra"); x.printPQ(); System.out.print("\n\nTesting poll (delete)\n"); while ( ! x.isEmpty() ) { x.poll(); x.printPQ(); } } }