You are required to use the List interface from the textbook. Additionally, you are required to use the Link class for doubly-linked nodes (which is different than the Link class for the practice assignments). Furthermore, you are required to start with the textbook's implementation of a doubly-linked list, but are not allowed to use a header node nor a trailer node. Use the BasicDLList class, which still has the required head and tail instance variables, but has removed the allocation of the header and trailer nodes. Do not allocate memory for an empty header nor a trailer node. In its current form, executing methods in the BasicDLList class will currently cause several run-time errors. An example of this is that for this project, the definition of curr being at the end of the list, is that it is null. For example, you need to update the moveToEnd method to be:
public void moveToEnd() { curr = null; // Set curr at list end }Your task is to modify your BasicDLList class so that the results of each method are identical with those of the DLList class. Expand your MenuDriver class from Project 1 by adding in code to create a BasicDLList object and calls its methods. The example below details the required text to be displayed.
Welcome to the Menu Driver for a bare bones list! Command options: I string_to_insert (insert a string at the current position) A string_to_append (append a string at the end) R (remove the string at the current position) S (move the current position to the start) E (move the current position to the end) P (move the current position backward) F (move the current position forward) L (display the length of the list) C (display the current position number) M number (move the current position to specific position) D (display the string at the current position) V (display all strings) O (display these options) Q (quit) Please enter a command (or 'O' for all of the options): I Inserting this text ;) Inserting 'Inserting this text ;)' ... Please enter a command (or 'O' for all of the options): A Appending this text :) Appending 'Appending this text :)' ... Please enter a command (or 'O' for all of the options): V ⟨ | Inserting this text ;), Appending this text :) ⟩ Please enter a command (or 'O' for all of the options): E Moving the current position to the end ... Please enter a command (or 'O' for all of the options): C Displaying the current position number ... The current position is 2 Please enter a command (or 'O' for all of the options): P Moving the current position backward ... Please enter a command (or 'O' for all of the options): C Displaying the current position number ... The current position is 1 Please enter a command (or 'O' for all of the options): F Moving the current position forward ... Please enter a command (or 'O' for all of the options): C Displaying the current position number ... The current position is 2 Please enter a command (or 'O' for all of the options): L Displaying the length of the list ... Length is 2 Please enter a command (or 'O' for all of the options): M 7 Moving current position to 7 ... Failed to move position to 7! Please enter a command (or 'O' for all of the options): M 0 Moving current position to 0 ... Successfully moved position to 0 Please enter a command (or 'O' for all of the options): R Removing the string at the current position ... Removed 'Inserting this text ;)' Please enter a command (or 'O' for all of the options): V ⟨ | Appending this text :) ⟩ Please enter a command (or 'O' for all of the options): S Moving the current position to the start ... Please enter a command (or 'O' for all of the options): D Displaying the string at the current position ... The current value is 'Appending this text :)' Please enter a command (or 'O' for all of the options): O Command options: I string_to_insert (insert a string at the current position) A string_to_append (append a string at the end) R (remove the string at the current position) S (move the current position to the start) E (move the current position to the end) P (move the current position backward) F (move the current position forward) L (display the length of the list) C (display the current position number) M number (move the current position to specific position) D (display the string at the current position) V (display all strings) O (display these options) Q (quit) Please enter a command (or 'O' for all of the options): Q Good-bye
Points Item ---------- -------------------------------------------------------------- _____ / 10 Style + Code is indented correctly + Documentation: (written for another software developer) * All source code files include Javadoc header block with description, @author, @version, etc. * Javadoc (with block tags, for example @param, @return) before each method * All non-trivial variables are commented * Comments included before major portions of code _____ / Compiles (max of 50% if it does not compile) _____ / 88 Successfully passes codePost tests _____ / 2 Completed rubric (estimates for each line including hours spent) _____ /100 Total _____ Approximate number of hours spent I, (REPLACE WITH YOUR FULL NAME), affirm that the code that I submitted is my own work and that I did not receive help that was not authorized by the instructor.
Copy and paste this rubric into a rubric-basicDLList.txt file (not a .docx, .doc nor .rtf file). Think of this as a checklist to ensure that you receive the maximum points possible. For each grade item, fill in your estimate for the grade you deserve. Additionally, include your estimate of how many hours your spent. Lastly, replace, "(REPLACE WITH YOUR FULL NAME)" with your full name to indicate that what you are submitting is entirely your own work.
Submit your MenuDriver.java and BasicDLList.java files to codePost.io. Do not submit List.java nor Link.java (they are already loaded in codePost). To register for a free codePost account, please follow these instructions. Submit your rubric-basicDLList.txt file to the appropriate Assignment folder in CougarVIEW. If you resubmit it, the new file will replace the older one.