Question: Please I need help implementing this code in java package csc 3 1 1 ; import java.util.Comparator; import net.datastructures. * ; / * * *

Please I need help implementing this code in java
package csc311;
import java.util.Comparator;
import net.datastructures.*;
/**
* A Adaptable PriorityQueue based on an heap.
*
* Course:
* Assignment:
* @author
*/
public class HeapPQ implements AdaptablePriorityQueue {
/* use default comparator, see DefaultComparator.java */
public HeapPQ(){
//TODO: implement this method
}
/* use specified comparator */
public HeapPQ(Comparator c){
//TODO: implement this method
}
/*
* Return the data array that is used to store entries
* This method is purely for testing purpose of auto-grader
*/
Object[] data(){
//TODO: replace the line below to return the actual array
return null;
}
/**
* The entry should be bubbled up to its appropriate position
* @param int move the entry at index j higher if necessary, to restore the heap property
*/
public void upheap(int j){
//TODO: implement this method
}
/**
* The entry should be bubbled down to its appropriate position
* @param int move the entry at index j lower if necessary, to restore the heap property
*/
public void downheap(int j){
//TODO: implement this method
}
@Override
public int size(){
// TODO Auto-generated method stub
return 0;
}
@Override
public boolean isEmpty(){
// TODO Auto-generated method stub
return false;
}
@Override
public Entry insert(K key, V value) throws IllegalArgumentException {
// TODO Auto-generated method stub
return null;
}
@Override
public Entry min(){
// TODO Auto-generated method stub
return null;
}
@Override
public Entry removeMin(){
// TODO Auto-generated method stub
return null;
}
@Override
public void remove(Entry entry) throws IllegalArgumentException {
// TODO Auto-generated method stub
}
@Override
public void replaceKey(Entry entry, K key) throws IllegalArgumentException {
// TODO Auto-generated method stub
}
@Override
public void replaceValue(Entry entry, V value) throws IllegalArgumentException {
// TODO Auto-generated method stub
}
}

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Accounting Questions!