'{ ' expected error! - Programmers Heaven

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

'{ ' expected error!

Wesley32Wesley32 Posts: 1Member
Hey all, I just need some simple help with this programming assignment.
I keep getting this error in my class that i want to extend and implement an interface.

here is my code for this class:

public class ArraySetList implements SetList
extends ArrayUnsortedList
{


public ArraySetList()
{
super();
}

public ArraySetList(int origCap)
{
super(origCap);
}


public void add(Object element)
{ //method to override the original add method in which this one adds it if it is not a duplicate.
if(!contains(element))
{
super.add(element);
}
}

public boolean remove(Object element)
{ //removes an element e from this list such that e.equals(element)
//and returns true; if no such element exist, returns false.
find(element);
if(found)
{
list[location] = list[numElements -1];
list[numElements - 1] = null;
numElements--;
}
return found;
}

}


Any help will be appreciated.
Sign In or Register to comment.