Creating a list model

I've been given the task to create a list model without using any of the existing JDK classes, e.g. arrays. It will need to be able to be sorted, searched, etc.

My attempt at this was to create a ListItem class, and a List class. Where each item in the list is an instance of ListItem, and List class contained the methods to add, remove, sort etc.

I got stuck when trying to create the ListItems, as I need 1 method to create ListItems. But as far as I understand they would all need different names, and I can't do dynamic naming of the object with my restrictions.

This made my try to re-think my whole approach to the problem and I'm having trouble. Can anyone help me out?

[705 byte] By [ccampbell87a] at [2007-10-3 11:24:08]
# 1
> need 1 method to create ListItems. But as far as I> understand they would all need different names, and INo, they don't. Just put them into an array or a collection class instance as anonymous as they are ...
quittea at 2007-7-15 13:49:44 > top of Java-index,Java Essentials,Java Programming...
# 2

> > need 1 method to create ListItems. But as far as I

> > understand they would all need different names, and

> I

>

> No, they don't. Just put them into an array or a

> collection class instance as anonymous as they are ...

without using any of the existing JDK classes, e.g. arrays

escrina at 2007-7-15 13:49:44 > top of Java-index,Java Essentials,Java Programming...