Assignment Help-Java link list in java

Assignment Help-Java link list in java

The purpose of this lab is to become familiar with the use of linked lists in Java.

Create a class called NameNode. The NameNode class should have in it a string that stores the last name of an individual, and a link to another NameNode. This class should also contain the following: // constructor – passed a last name, and next node to point to (or null) // getters – for name and next node
// setter – for next node

Develop a main method that contains code for testing the NameNode class by creating a list of nodes, and then traversing the list to display the names.

Create a NameList class that stores a linked list of names, containing the following constructor and methods: // a no-arg constructor (to create an empty list)
// isEmpty method (which returns true if the list is empty, and returns false otherwise) // append method (to append a new name to the end of the list)
// print method (that displays the complete list of name, one name per line) Write a simple main program for testing your class.

Please follow and like us: