Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

java code please one class Due Wednesday by 11:59pm Points 100 Submitting a text entry box or a file upload Attempts 0 Allowed Attempts 1

java code please one class image text in transcribed
Due Wednesday by 11:59pm Points 100 Submitting a text entry box or a file upload Attempts 0 Allowed Attempts 1 Available until Feb 22 at 11:59pm Add iterator support to MyLinkedList by following the steps below, - Create the class MyLinkedListiterator E>, which implements the Iterator interface. - MyLinkedListiterator should contain the following data items. "list" of type MyLinkedList "currentNode" of type Node E>, initially set to list.head - Make MyLinkedList implement the Iterable interface by adding the iterator() method, which should return an instance of MyLinkedListiterator. - Add the hasNext() and next() methods in MyLinkedListiterator. The hasNext() method should return true as long as currentNode is not null The next() method should return the list's data item at currentNode, and advance currentNode You will have to fill in some of the blanks, such as handling exceptions and initializing the "list" member of MyLinkedListiterator. Test it by creating an instance of MyLinkedList, adding data to it, and using the enhanced for-loop to iterate through it and print out each data item. Turn in the following, - The source files (no zip file, just the individual .java files). - A screen shot of your program in action. It should show the result of the test run

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

Beginning Microsoft SQL Server 2012 Programming

Authors: Paul Atkinson, Robert Vieira

1st Edition

1118102282, 9781118102282

More Books

Students also viewed these Databases questions