kindly see attached pdf.
NOTE: The implementation class must be named CBListLinkIMP
Fill in the CBListLinkIMP.java with the necessary data fields and method bodies. As you complete a method review it and run any appropriate JUnit tests.
You must use the linked list implementation to store the Characters of a CBListLinkIMP. This is the book strategy that has head, cur, and tail pointers, and has a dummy head Link and a dummy tail Link. Review your notes (we discussed in class how to do this implementation). If you are unsure about this, contact me, NOT ANYONE ELSE. I need to guide you through the problem solving process.
CBListADT PACKAGE CLASS USE TREE DEPRECATED INDEX HELP PREV CLASS NEXT CLASS FRAMES NO FRAMES SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD Interface CBListADT public interface CBListADT A CBListADT is a cursor based list whose elements are of type Character. It is based upon the List ADT in section 9.2.1.1 of the book. CBListADT Implementation Requirements Implementations must not use Generics Implementation elements must not be of type Object Implementations must be able to store at least 10 elements Implementations must produce empty lists when instantiated. Implementations must override the toString() and equals(Object) methods. The toString() method should call asString() and the equals(Object) method should call equalsTo(Object). All methods listed below must be implemented. Version: 20210308 Author: acsiochi Method Summary Modifier and Type Method and Description java.lang.String asString() Get the state string representation of this CBListADT object. boolean equalTo(java.lang.Object o) Determines if this CBListADT object is equal to the object referred to by o. java.lang.Character get() Get the element at the current position. void goNext() Move the cursor to the element after the current element. All Methods Instance Methods Abstract Methods file:///Users/acsiochi/git21/270sp21/asg3/doc/package-summary.html file:///Users/acsiochi/git21/270sp21/asg3/doc/class-use/CBListADT.html file:///Users/acsiochi/git21/270sp21/asg3/doc/package-tree.html file:///Users/acsiochi/git21/270sp21/asg3/doc/deprecated-list.html file:///Users/acsiochi/git21/270sp21/asg3/doc/index-files/index-1.html file:///Users/acsiochi/git21/270sp21/asg3/doc/help-doc.html file:///Users/acsiochi/git21/270sp21/asg3/doc/index.html?CBListADT.html file:///Users/acsiochi/git21/270sp21/asg3/doc/CBListADT.html javascript:show(2); javascript:show(4); void goPrev() Move the cursor to the element before the current element. void insert(java.lang.Character c) Insert c at the cursor, so that c becomes the current element. int length() Get the number of elements in this CBListADT object. boolean remove() Remove the current element. Method Detail asString java.lang.String asString() Get the state string representation of this CBListADT object. NOTE: use this method in your implementation of toString(). This is the notation described in the book and in class. Here are the specific requirements: the head of the list is represented by "<", the="" tail="" is="" represented="" by="" "="">" the current position is represented by "|" (the pipe symbol), with the element immediately after the pipe being the current element an empty CBListADT is represented by "< |="">" all elements are immediately followed by a comma, unless followed by the pipe or the tail a comma is followed by a space the head "<" is="" followed="" by="" a="" space="" the="" tail="" "="">" is preceded by a space the pipe is separated from any element by a single space Here are examples: // space follows the head (<) and="" precedes="" the="" tail="" (="">) < |=""> // no comma after b because pipe ("|") is next // no comma after c because tail (">") is next // a comma comes after a because neither the pipe nor the tail are next // Pipe has a single space between it and b and between it and c< a,="" b="" |="" c=""> Returns: state string equalTo boolean equalTo(java.lang.Object o) Determines if this CBListADT object is equal to the object referred to by o. NOTE: use this method in your implementation of equals(Object). To be equal, o can't be null and must refer to an object of a class that implements CBListADT. The object to which o refers must have the same number of elements as this CBListADT object and their cursors must be at the same positions. The corresponding elements of this CBListADT object and the object to which o refers must be equal. Parameters: o - reference to object against which equality is checked Returns: true if equal, false else get java.lang.Character get() throws java.util.NoSuchElementException Get the element at the current position. The cursor identifies the current position. If this is not possible, throw a NoSuchElementException Returns: current element if one exists Throws: java.util.NoSuchElementException - if there is no current element goNext void goNext() Move the cursor to the element after the current element. This makes that element the new current element. If this is not possible, do nothing. goPrev PACKAGE CLASS USE TREE DEPRECATED INDEX HELP void goPrev() Move the cursor to the element before the current element. This makes that element the new current element. If this is not possible, do nothing. insert void insert(java.lang.Character c) Insert c at the cursor, so that c becomes the current element. All elements from the original current element to the last element are shifted one position closer to the tail. NOTE: all instructor tests will not cause the maximum CBListADT capacity to be exceeded. Parameters: c - Character to be inserted length int length() Get the number of elements in this CBListADT object. Returns: number of elements remove boolean remove() Remove the current element. All elements starting from the element immediately after the original current element to the last element are shifted one position closer to the head. The new current element is the one that was after the original current element. If it is not possible to remove, return false and do nothing to change the state of this CBListADT object. If it is possible to remove the current element, do so and return true. Returns: true if current character was removed, false else file:///Users/acsiochi/git21/270sp21/asg3/doc/package-summary.html file:///Users/acsiochi/git21/270sp21/asg3/doc/class-use/CBListADT.html file:///Users/acsiochi/git21/270sp21/asg3/doc/package-tree.html file:///Users/acsiochi/git21/270sp21/asg3/doc/deprecated-list.html file:///Users/acsiochi/git21/270sp21/asg3/doc/index-files/index-1.html file:///Users/acsiochi/git21/270sp21/asg3/doc/help-doc.html PREV CLASS NEXT CLASS FRAMES NO FRAMES SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD file:///Users/acsiochi/git21/270sp21/asg3/doc/index.html?CBListADT.html file:///Users/acsiochi/git21/270sp21/asg3/doc/CBListADT.html)>">",>