Question: Position positionAtIndex ( int i ) - > take in a Position object, get its index in the list Traverse the linked list with a

Position positionAtIndex (int i)-> take in a Position object, get its index in the list
Traverse the linked list with a counter until you match the index. Check for valid indices.
indexAtPosition(Position pos)-> Traverse the linked list with a counter until you
make the position input, return the index.
E get (int i)-> Use the sub-class (LinkedPositionalList get function) getter using
positionAtIndex
E set(int I, E e)-> Use the sub-class (LinkedPositionalList set function) setter using
positionAtIndex
Add (int i, E e)-> add a position in the list
Remove (int i)-> remove the position/element at index I
Run the main (no need to modify) of SequenceTester.java to compare results, they
should be identical for both types of 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 Programming Questions!