Question: JAVA GENERIC DOUBLY LINKED LIST WITH LIST INTERFACE Hello, I need some serious help on creating a generic doubly linked list which implements a list

JAVA GENERIC DOUBLY LINKED LIST WITH LIST INTERFACE Hello, I need some serious help on creating a generic doubly linked list which implements a list interface with methods listed below. It seems really easy, but I'm burning my brain out trying to figure it out. I'd appreciate all the help I can get!

public interface ListInterface { boolean isEmpty(); // Sees whether this list is empty. // return True if the list is empty, or false if not. boolean add(T newEntry); // Adds a new entry to the list. // post If successful, newEntry is stored in the list and // the count of items in the list has increased by 1. // param newEntry The object to be added as a new entry. // return True if addition was successful, or false if not. boolean remove(T anEntry); // Removes one occurrence of a given entry from this list, if possible. // post If successful, anEntry has been removed from the list and the count of // items in the list has decreased by 1. // param anEntry The entry to be removed. // return True if removal was successful, or false if not. void clear(); // Removes all entries from this list. // post List contains no items, and the count of items is 0. int getFrequencyOf(T anEntry); // Counts the number of times a given entry appears in list. // param anEntry The entry to be counted. // return The number of times anEntry appears in the list. boolean contains(T anEntry); // Tests whether this list contains a given entry. // param anEntry The entry to locate. // return True if list contains anEntry, or false otherwise. }

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 Databases Questions!