Taaseen-Ali / AppleSauceQ

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

AppleSauceQ

Hasif Ahmed, Wenting Li, Kerwin Chen

Ordered To-Do List:

  1. do isEmpty;
  2. do size;
  3. do offerFirst;
  4. do offerLast;
  5. do peekFirst;
  6. do peekLast;
  7. do pollLast;
  8. do pollFirst

Summary: We plan to develop our interface according to our to do list.

The methods we think that are essential are...

 public boolean	offerFirst(E e)

//Inserts the specified element at the front of this deque unless it would violate capacity restrictions.

public boolean	offerLast(E e)

//Inserts the specified element at the end of this deque unless it would violate capacity restrictions.

public E	peekFirst()

//Retrieves, but does not remove, the first element of this deque, or returns null if this deque is empty.

public E	peekLast()

//Retrieves, but does not remove, the last element of this deque, or returns null if this deque is empty.

public E	pollFirst()

//Retrieves and removes the first element of this deque, or returns null if this deque is empty.

public E	pollLast()

//Retrieves and removes the last element of this deque, or returns null if this deque is empty.

public int	size()

//Returns the number of elements in this deque.

We plan on using ArrayList as our underlying class due to the fact that a deque focuses on both ends of a data set and an ArrayList makes it easy to access any side of the ArrayList and make modifications.

About


Languages

Language:Java 100.0%