Answered step by step
Verified Expert Solution
Question
1 Approved Answer
2 Assignment Requirement As we discussed in class, you need to implement the following things: A generic List interface, which encapsulates the ADT for a
2 Assignment Requirement As we discussed in class, you need to implement the following things: A generic List interface, which encapsulates the ADT for a list data structure. A generic LinkedList class, which implements List interface A generic LinkedListNode class A Junit test class LinkedList Tester, which should test all the functions you imple- mented in your LinkedList class and LinkedListNode class. 3 ADT for a list data structure * Get data stored in head node of list. ** public T get First(); /** * Get the head node of the list. ** public List Node get FirstNode(); /** * Get data stored in tail node of list. **/ public T getLast(); /** * Insert a new node with data at the head of the list. **/ public void insert First ( T data ); /** Insert a new node with data after currentNode **/ public void insert After ( ListNode currentNode, T data); /** * Insert a new node with data at the tail of the list. **/ public void insert Last ( T data ); ** * Remove head node **/ public void delete First (); /** * Remove tail node **/ public void deleteLast(); /** * Remove node following currentNode * If no node exists (i.e., currentNode is the tail), do nothing **/ public void delete Next ( ListNode currentNode); /** * Get the number of elements in this list. **/ public int size (); 2 Assignment Requirement As we discussed in class, you need to implement the following things: A generic List interface, which encapsulates the ADT for a list data structure. A generic LinkedList class, which implements List interface A generic LinkedListNode class A Junit test class LinkedList Tester, which should test all the functions you imple- mented in your LinkedList class and LinkedListNode class. 3 ADT for a list data structure * Get data stored in head node of list. ** public T get First(); /** * Get the head node of the list. ** public List Node get FirstNode(); /** * Get data stored in tail node of list. **/ public T getLast(); /** * Insert a new node with data at the head of the list. **/ public void insert First ( T data ); /** Insert a new node with data after currentNode **/ public void insert After ( ListNode currentNode, T data); /** * Insert a new node with data at the tail of the list. **/ public void insert Last ( T data ); ** * Remove head node **/ public void delete First (); /** * Remove tail node **/ public void deleteLast(); /** * Remove node following currentNode * If no node exists (i.e., currentNode is the tail), do nothing **/ public void delete Next ( ListNode currentNode); /** * Get the number of elements in this list. **/ public int size ()
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