Implement the sequence class from Section 3.3. You may wish to provide some additional useful methods, such

Question:

Implement the sequence class from Section 3.3. You may wish to provide some additional useful methods, such as:

(1) A method to add a new element at the front of the sequence; 

(2) A method to remove the element at the front of the sequence; 

(3) A method to add a new element at the end of the sequence; 

(4) A method that makes the last element of the sequence become the current element; 

(5) A method that returns the ith element of the sequence (starting with the 0th at the front);

(6) A method that makes the ith element become the current element.

Fantastic news! We've Found the answer you've been seeking!

Step by Step Answer:

Related Book For  book-img-for-question
Question Posted: