• Post Reply Bookmark Topic Watch Topic
  • New Topic

Data Structure  RSS feed

 
Ranch Hand
Posts: 125
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I hace created the following interface-

public interface MyList
{
public void insert(Object o);
public Object remove();
public boolean is Empty();
...
}

There are many more methods to the above List interface.

I would now like to implement that interface.
public class MyClass implements MyList{
public void insert(Object o)
{
}

What are the instance variables I will need?
Can you help me write the insert method()? If I know how to get started, I can then write the other 10 methods I have defined.
 
(instanceof Sidekick)
Ranch Hand
Posts: 8791
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Your subject line captured the next thing to solve nicely. What have you considered or tried? What are your requirements for size ... some known max or limited only by memory or other? What do you think of when you consider those options?

You know we're not going to give answers without making you sweat at least a little.
[ April 24, 2005: Message edited by: Stan James ]
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!