+1 (218) 451-4151
glass
pen
clip
papers
heaphones

Explain how any implementation of the PositionalList ADT can be made to support all methods of…

Explain how any implementation of the PositionalList ADT can be made to support all methods of…

Explain how any implementation of the PositionalList ADT can be made to support all methods of the List ADT, described in Section 7.1, assuming an implementation is given for the positionAtIndex(i) method, proposed in Exercise C- 7.36.Exercise C- 7.36.Suppose we want to extend the PositionalList interface to include a method, positionAtIndex(i), that returns the position of the element having index i (or throws an IndexOutOfBoundsException, if warranted). Show how to implement this method, using only existing methods of the PositionalList interface, by traversing the appropriate number of steps from the front of the list.