CircularArrayQueue Per Wolde 2002 =========== ADT CircularArrayQueue ============ Insert: -Put in a element in the queue Remove: -Returns and remove the last element toString: -Returns the elements in a string toDebugString: -Returns the whole array in a string isEmpty: -Returns true if empty queue isFull -Returns true if full queue Object arr[] = arrayen ins = in-point peek = out-point ======== Algorithm (pseudo) ========= Arraysize inits by the constructor Metoder: -insert(Object o): if !isFull: arr[ins]=o -remove(): if !isEmpty: temp = arr[peek] arr[peek]=null peek = peek+1 modulo arr.length return temp -toString(): count_step = 0 if peek>ins: count_step == (ins-peek)+arr.length if peek|" if index == ins: end "|<-" string += arr[index] return string -isEmpty(): if ins==peek: return true else return false -isFull(): if ins+1 == peek: return true else return false