return \"(\"+ name + \",\" + next + \")\"; } } public class ArrayLL{ private Ite
ID: 3613512 • Letter: R
Question
return "("+ name + "," + next + ")";
}
}
publicclass ArrayLL{
private Item[] all;
privateint numItems;
privateint front;
privateint[] avail;
privateint numAvail;
public ArrayLL(intmaxItems) {
this.all[]= new Item[maxItems];
this.numItems = 0 ;
this.front= 0;
this.avail[] = newint [maxItems];
// Adds a name to the front ofthis array linked list
// Throws anArrayIndexOutOfBoundsException if the array isfill
publicvoid addFront(Stringname)
throwsArrayIndexOutOfBoundsException {
if(this.numItems >maxItems)
{
thrownew ArrayIndexOutOfBoundsException("list isfull");
}
// COMPLETE THISMETHOD
}
Explanation / Answer
There is probably a question explanation in addition to the givencode - could you post it? I'm uncertain of how the ArrayLLshould be implemented.
Related Questions
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.