Question: 1 ) (List Implementation) (35 points): Suppose that you want an operation for the ADT List that returns the first position of a given object
1 ) (List Implementation) (35 points): Suppose that you want an operation for the ADT List that returns the first position of a given object in the list. The header of the method is as follows: public int getFirstPosition(T anObject) where T is the general type of the objects in the list. Write an implementation of this method for the LList class. Include testing of the method in the main method of the LList class.
2) (List Implementation) (35 points): Write a method in the DoublyLList class that deletes the first item containing a given value from a doubly linked list. The header of the method is as follows: public boolean removeValue(T aValue) where T is the general type of the objects in the list and the methods returns true if such an item is found and deleted. Include testing of the method in a main method of the DoublyLList class.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
