>>2 FIAL
public class List
{
private Object [] list;
private int size;
private int count;
List()
{
size = 1;
list = new Object[size];
count = 0;
}
List( int inSize )
{
size = 1;
if ( inSize > 0 )
{
size = inSize;
}
list = new Object[size]
count = 0;
}
void add( Object inObject )
{
// add an object to the end of list, increment count by one
}
int find( Object inObject )
{
// find given object in list and return its index in the array
}
void delete( Object inObject )
{
// find the given object and then delete it by shifting every element in the array above inObject down one space, decrement count by one
}
car()
{
return list[0]
}
cdr()
{
return list[count]
}
}
>>2
>>2