Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

1. Write the programs in Java and save them as .java files. Test your programs and fix any compilation errors. 2. Copy and paste your

1. Write the programs in Java and save them as .java files. Test your programs and fix any compilation errors.

2. Copy and paste your final version of the programs to ONE MS Word document and save it as a .docx file.

3. Please submit both your source codes (.java files) and the Word document to the Blackboard. I will test the programs by using the source codes (.java file) and make comments on the Word document from the Blackboard grading area.

For this project, you will add the following methods to the singly linked list class, see the attached LinkedList.java.

removeAt(int position) removes the node at the specified position, returning the data of the removed node. It throws an IllegalArgument exception if position is invalid

removeAll() removes all nodes in the list.

getNumberOfNodes() returns the number of nodes in the list

equals(SinglyLinkedList list) compares if two lists contain the same nodes in the same order.

reverse() returns a reversed singly linked list.

1. Implement all the above methods with appropriate Javadoc style comments.

2. For each method, be sure to test your work by adding test code to a main method in a test class.

3. Add appropriate Javadoc style comments to the rest of the methods in the LinkedList 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

Graph Databases

Authors: Ian Robinson, Jim Webber, Emil Eifrem

1st Edition

1449356265, 978-1449356262

Students also viewed these Databases questions

Question

Provide examples of Dimensional Tables.

Answered: 1 week ago