CS 4521 PA6 — Array Algorithms

Due before November 24, 15 points.

For this assignment you will write code for a binomial heap.

Setup

  1. First you need to download the file BinomialHeap.zip to a convenient location.
  2. Then unzip the file. This will create a NetBeans project folder.
  3. Run NetBeans and open this project.

Assignment

To complete the assignment you will need to implement code in two classes:

You will need to add or modify code in several methods. The places where you need to add code are indicated by "FIXME" comments. Read method comments in both classes to see what your implementation should be doing.

There are no compile-time errors in the existing code. For methods that you are modifying that have a return value, the existing return value is just a dummy value. If you run the main program as-is, it will generate run-time exceptions.

The binomialheap.Main class contains a test program for your binomial heap. Feel free to make changes to this class if you need to get more information for debugging. However the final version should invoke main.test(100) for a thorough test.

Many of the methods that you will be working with have assert statements. They are used liberally to ensure that you get the earliest possible reports of any errors in your code. They should not be removed.

What to Turn in

You should turn in a copy of your code for all classes that you modify. These classes should have your name included in comments. You should also turn in a modified script of the program execution. You can turn in the code and script in lab on November 17 or submit them by web drop before Thanksgiving break.

Section Header

Section overview text.