In this homework you will implement find() and duplicate() methods for a linked list class. To

keep things simple, the list class and its node class aren’t generic. The data of each node is one char, stored in a CharNode class that is provided. In the Eclipse workspace of your choice, create a new Java project containing package “ linked ” and add to it the 3 provided source files: CharNode. java, CharLinkedList. java, and LinkedListTester. java. 

Add the following methods to CharLinkedList. java:

• public CharNode find(char ch) – Returns the first (i.e. closest to the head) node in the list whose data is equal to ch. If there is no such node, returns null.
• public void duplicate(char ch) – Finds (using the find() method above) the first node in the list whose data is equal to ch. If there is no such node, throws an IllegalArgumentException with a useful message. If the node is found, creates a new node containing the same data, and inserts that node into the list either immediately before or immediately after the found node (your choice) . Pay attention to corner cases: the node you find might be anywhere in the list – head, middle, or tail. The list might be empty, or might contain only 1 node … be sure your code can handle those cases. The way to be sure is to write

test code. 

The CharNode starter file contains a hasIntegrity() method that checks some (but not all) aspects of list integrity . Use it (maybe in assert statements) in your find() and duplicate() methods if it helps you. 

This is a win - or - lose assignment. If your code passes the graderbot (class LinkedListTester), you get 100 points. If your code fails any part of the graderbot, you get zero points. As always, work will not be accepted after the deadline.