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.
indexAtPositionPosition pos Traverse the linked list with a counter until you
make the position input, return the index.
E get int i Use the subclass LinkedPositionalList get function getter using
positionAtIndex
E setint I, E e Use the subclass LinkedPositionalList set function setter using
positionAtIndex
Add int i E e add a position in the list
Remove int i remove the positionelement 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
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
