We come up with an initial design by listing methods based on the ADTs for the specialized structures.
We initially have eight different object types, and each object type must be able to understand the public methods shown in the listing below.
Arrayed Linked Arrayed Linked Arrayed Linked Arrayed Linked
Stack Stack Queue Queue Deque Deque Bag Bag
Idea Idea Idea Idea Idea Idea Idea Idea
------------------------------------------------------------------------------------------------------
(behaviors/methods)
size size size size size size size size
isEmpty isEmpty isEmpty isEmpty isEmpty isEmpty isEmpty isEmpty
add add add add add add add add
removeAll removeAll removeAll removeAll removeAll removeAll removeAll removeAll
toNativeList toNativeList toNativeList toNativeList toNativeList toNativeList toNativeList toNativeList
toString toString toString toString toString toString toString toString
push push enqueue enqueue first first contains contains
pop pop dequeue dequeue last last any any
peek peek peek peek addFirst addFirst add add
addLast addLast remove remove
removeFirst removeFirst
removeLast removeLast