Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

1-Implement A generic List interface, which encapsulates the ADT for a list data structure. That has the following Get data stored in head node of

image text in transcribed
image text in transcribed
1-Implement A generic List interface, which encapsulates the ADT for a list data structure. That has the following Get data stored in head node of list. */ public T getFirst . Get the head node of the list. / public ListNode getFirstNode : 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 insertFirst (I data); Insert a new node with data after currentNode public void insertAfter (ListNode currentNode, T data); Insert a new node with data at the tail of the list. */ public void insertLast (T data Remove head node public void delete First : Remove tail node public void delete Last : - Remove node following currentNode If no node exists (ie, currentNode is the tail), do nothing public void delete Next (ListNode currentNode); / / Get the number of elements in this list public int size . Check if the list is empty. public boolean IsEmpty : / Then implement 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. 1-Implement A generic List interface, which encapsulates the ADT for a list data structure. That has the following Get data stored in head node of list. */ public T getFirst . Get the head node of the list. / public ListNode getFirstNode : 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 insertFirst (I data); Insert a new node with data after currentNode public void insertAfter (ListNode currentNode, T data); Insert a new node with data at the tail of the list. */ public void insertLast (T data Remove head node public void delete First : Remove tail node public void delete Last : - Remove node following currentNode If no node exists (ie, currentNode is the tail), do nothing public void delete Next (ListNode currentNode); / / Get the number of elements in this list public int size . Check if the list is empty. public boolean IsEmpty : / Then implement 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

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Oracle Database 11g SQL

Authors: Jason Price

1st Edition

0071498508, 978-0071498500

More Books

Students also viewed these Databases questions

Question

The models used to analyse different national cultures.

Answered: 1 week ago

Question

The nature of the issues associated with expatriate employment.

Answered: 1 week ago