{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

Sequence - classSequence cfw*,*elements publicSequence...

Info iconThis preview shows pages 1–3. Sign up to view the full content.

View Full Document Right Arrow Icon
class Sequence  /**  * Initializes this Sequence object to be empty, with an initial capacity of ten  * elements.  */  public Sequence()   /**  * Initializes this Sequence object to be empty, with a specified initial  * capacity.  * @param capacity  the initial capacity of this Sequence object.  * @throw IllegalArgumentException  if capacity is non-positive.  */  public Sequence (int n)  /**  * Returns the number of elements in this Sequence object.  * @return the number of elements in this Sequence object.  */  public int size()  /**  * Appends a specified element to this Sequence object. 
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
* @param element  the element to be inserted at the end of this  * Sequence object.  */  public void append (E element)  /**  * Returns the element at a specified index in this Sequence object.  * The worstTime(n) is constant, where n is the number of elements in this 
Background image of page 2
Image of page 3
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}

Page1 / 3

Sequence - classSequence cfw*,*elements publicSequence...

This preview shows document pages 1 - 3. Sign up to view the full document.

View Full Document Right Arrow Icon bookmark
Ask a homework question - tutors are online