Professional Documents
Culture Documents
Representations
• A Queue is a representation of a line:
– Have a front (head) and back (tail)
Representation Invariants – Enter at the tail (enqueue)
– Leave from the head (dequeue)
– Remain in order of insertion
Helping to Design Good Classes
• You decide how representation is done
– What data structure to use.