Question: Implement a java Deque class using generics and a circular array with a menu-based tester. void addFirst(E e) -Inserts the specified element at the front

Implement a java Deque class using generics and a circular array with a menu-based tester.

void addFirst(E e) -Inserts the specified element at the front of this deque.

void addLast(E e) - Inserts the specified element at the end of this deque.

E removeFirst() -Retrieves and removes the first element of this deque.

E removeLast() - Retrieves and removes the last element of this deque.

int size() - Returns the number of elements in this deque.

Iterator - iterator() Returns an iterator over the elements in this deque in proper sequence.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!