d-Heap A simple generalization of a binary heap is a d-heap, which is exactly like a binary heap (the max-heap and min-heap in section 5.6 of the textbook are binary heaps) except that all nodes have d children (thus, a binary heap is a 2-heap). The following diagram shows a 3-heap. In this assignment, you will implement a 3-heap that stores elements of type Integer. It has the property that every node stores a value that is greater than or equal to the value of all of its children. Class to Write Write a class named DHeapImpl to implement all the methods declared in the DHeap interface ([url removed, login to view] is provided for you to use). /** * This method returns true if pos is a leaf position */ public boolean isLeaf(int pos); /** * This method returns position for the first child of pos */ public int firstChild(int pos); /** * This method returns position for parent */ public int parent(int pos); /** * This method heapifies the array contents */ public void buildDHeap(); /** * This method inserts val into the heap */ public void insert(Integer val); /** * This method removes the maximum value */ public Integer removeMax(); /** * This method removes element at the specified position pos */ public Integer remove(int pos); In addition to all the methods declared in the DHeap interface, the class DHeapImpl must also have the following constructor: public DHeapImpl(Integer heapData, int num, int maxSize) where num is the number of elements now in heap and maxSize is the maximum size of the heap. This constructor will call buildHeap() to heapify the Integer array heapData. Note that the heap must be a 3-heap.
1) Complete and fully-functional working program(s) in executable form as well as complete source code of all work done.
2) Deliverables must be in ready-to-run condition, as follows (depending on the nature of the deliverables):
a) For web sites or other server-side deliverables intended to only ever exist in one place in the Buyer's environment--Deliverables must be installed by the Seller in ready-to-run condition in the Buyer's environment.
b) For all others including desktop software or software the buyer intends to distribute: A software installation package that will install the software in ready-to-run condition on the platform(s) specified in this bid request.
3) All deliverables will be considered "work made for hire" under U.S. Copyright law. Buyer will receive exclusive and complete copyrights to all work purchased. (No GPL, GNU, 3rd party components, etc. unless all copyright ramifications are explained AND AGREED TO by the buyer on the site per the coder's Seller Legal Agreement).