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
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started