1 What to Turn in

Lab 3 Standard: Implementing Heaps

We’ve discussed several tree-based data structures in class recently. We didn’t write code for them all, as that would distract from the goal of you understanding when to use these data structures. That said, all of these are good chances to practice Java programming on trees. Accordingly, this lab asks you to implement (and test) heaps in Java.

The notes on heaps described you the initial classes and the desired interface for heaps. It also outlined the code for the merge method, but didn’t write it in Java notation. Your goal is to get as far as you can finishing the heaps implementation.

This starter file gives you the interface and initial classes. If you edit this directly, first change the file name to IHeap.java, otherwise your Java editor might complain that you have no class named IHeap-starter (or copy/paste these contents into a new IHeap.java file).

We recommend that you work on one method at a time, including writing the method and writing test cases for it. Simply comment out the methods you haven’t written yet from the interface so that your code will compile.

1 What to Turn in

Submit a zip of all .java files that you produced for this assignment to the Lab3 assignment in InstructAssist.