Question: Ordered Linked List The objective of this project is to enhance the linked list program (specifically, your solution code for Lab24a) to maintain the linked

 Ordered Linked List The objective of this project is to enhance

the linked list program (specifically, your solution code for Lab24a) to maintain

the linked list in alphabetical order. The new program will also not

allow the list to have duplicate nodes: if the input data contains

duplicate values, then the program will increment a nodeCount field in the

Ordered Linked List The objective of this project is to enhance the linked list program (specifically, your solution code for Lab24a) to maintain the linked list in alphabetical order. The new program will also not allow the list to have duplicate nodes: if the input data contains duplicate values, then the program will increment a nodeCount field in the corresponding Node object. The starting codc that you must use is your solution to Lab24a. Changes to the NodecE> Class e The Node class needs a new instance variable: int nodeCount; e The constructor method for the Node class must be enhanced to set the nodeCount variable to l .The toString) method of the Node class must be modified so that it includes both the element text and the value of the nodeCount variable. The fomat of the resulting string must be: elementTexr oodeCon The Sample Input and Output section of this document shows examples of this format. .A new method called getElement) must retum a reference to the element object. Existing User Commands Your starting program must support all the commands required by Lab24a: Command Parameters(s) Description hel contains first ut help text. Test if list contains stri Get the first index of specified string s tri string Get the list item at specified inde Get the last index Read input file into memory Output memory data to consol Turn VER last strin Ordered Linked List The objective of this project is to enhance the linked list program (specifically, your solution code for Lab24a) to maintain the linked list in alphabetical order. The new program will also not allow the list to have duplicate nodes: if the input data contains duplicate values, then the program will increment a nodeCount field in the corresponding Node object. The starting codc that you must use is your solution to Lab24a. Changes to the NodecE> Class e The Node class needs a new instance variable: int nodeCount; e The constructor method for the Node class must be enhanced to set the nodeCount variable to l .The toString) method of the Node class must be modified so that it includes both the element text and the value of the nodeCount variable. The fomat of the resulting string must be: elementTexr oodeCon The Sample Input and Output section of this document shows examples of this format. .A new method called getElement) must retum a reference to the element object. Existing User Commands Your starting program must support all the commands required by Lab24a: Command Parameters(s) Description hel contains first ut help text. Test if list contains stri Get the first index of specified string s tri string Get the list item at specified inde Get the last index Read input file into memory Output memory data to consol Turn VER last strin

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!