Question
Create a linked list of names using a class called NameNode. The NameNode class should have in it a string that stores the last name
Create a linked list of names using 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 linked list. 2. 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) // append method (to append a new name to the list) // print method(that displays the complete list of name, one name per line) Write a simple main program for testing your class. For this lab, turn in each of the Java files created.
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