Howdy, Stranger!

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

Categories

Welcome to the new platform of Programmer's Heaven! We apologize for the inconvenience caused, if you visited us from a broken link of the previous version. The main reason to move to a new platform is to provide more effective and collaborative experience to you all. Please feel free to experience the new platform and use its exciting features. Contact us for any issue that you need to get clarified. We are more than happy to help you.

'{ ' 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.