Assignment Linked List Help
- From: "roubir" <rmissak@xxxxxxxxx>
- Date: 30 May 2006 23:31:03 -0700
Can some please implement a class called MyList to finish this off?
public class MyList<E extends Comparable<E>> extends List<E> {
}
----------------------------------------------------------------------------------------------------
It must be implemented with this List.java:
public abstract class List<E extends Comparable<E>> {
protected class Node<T extends Comparable<T>> {
protected Node(T data) {
this.data = data;
}
protected T data;
protected Node<T> next;
}
public abstract void insert(int index, E data) throws ListException;
public boolean isEmpty() { return head == null; }
public abstract E remove(int index) throws ListException;
public void reverse() { head = reverse(head, null); }
protected abstract Node<E> reverse(Node<E> curr, Node<E> prev);
public abstract int search(E data) throws ListException;
public int size() { return size; }
protected Node<E> head;
protected int size;
}
I need help for this assignment ......
Thanks...
.
- Follow-Ups:
- Re: Assignment Linked List Help
- From: jmcgill
- Re: Assignment Linked List Help
- From: Oliver Wong
- Re: Assignment Linked List Help
- From: Alex Hunsley
- Re: Assignment Linked List Help
- From: chris brat
- Re: Assignment Linked List Help
- Prev by Date: Re: Problems with Map.size()..........
- Next by Date: Re: Assignment Linked List Help
- Previous by thread: Checking a phone number
- Next by thread: Re: Assignment Linked List Help
- Index(es):