Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Written in java Write a doubly linked list of type double. This link list is similar to the singly linked list except that each node

Written in java

image text in transcribedimage text in transcribedimage text in transcribed

Write a doubly linked list of type double. This link list is similar to the singly linked list except that each node in addition to having data and a next link it now has a previous link. Lab Solution Requirements: - Functionality. (80pts) - No Syntax, Major Run-Time, or Major Logic Errors. (80pts*) - *Code that cannot be compiled due to syntax errors is nonfunctional code and will receive no points for this entire section. - *Code that cannot be executed or tested due to major run-time or logic errors is nonfunctional code and will receive no points for this entire section. - Set up the Project. (10pts) - Set up the Project. (10pts) - First download the driver file and include it in your project. - Do not modify the driver. - Create a class and name it, exactly, DoubleDoubleLL. - Create Doubly Linked List Node. (10pts) - An internal class must be used to represent a Node in the linked list. - This node must contain both data and two links. - One link must point forward to the next item in the list. - The other link must point backwards to the previous item in the list. - All the above must apply for full credit. - Create methods gotoNext, gotoPrev, reset, gotoEnd, and hasMore. (10pts) - The method "gotoNext" must move the current reference forward by one node. If the current reference is null, then the method does nothing. - The method "gotoPrev" must move the current reference backwards by one node. If the current reference is null, then the method does nothing. - The method "reset", must move the current reference to the head reference. - The method "gotoEnd", must move the current reference to the last node in the list. - The method "hasMore", must return true if the current reference is not null or false if it is. - All methods must have the public scope and their identifiers must match exactly what is defined above. - Create methods getCurrent and setCurrent. (10pts) - The method "getCurrent" must return the data at the current reference. If the current reference is null, then it must return null. - The method "setCurrent" must modify the data at the current reference given new data. If the current reference is null, then it must do nothing. - All methods must have the public scope and their identifiers must match exactly what is defined above. - Create methods add and addAfterCurrent. (10pts) - The method "add", must create a new node with data provided via a parameter and add it to the end of the list. If the head reference is null, then it adds the new node to the start of the list. - The method "addAfterCurrent", must create a new node with the data provided via a parameter and add it after the current reference. If the current reference is null, the do not add the data to the list. See images below for the concept. - All methods must have the public scope and their identifiers must match exactly what is defined above. - After either "add" or "addAfterCurrent" the integrity of the list must be maintained, and all links and references need to be properly set. - All the above must apply for full credit. - Create methods remove and removeCurrent. (10pts) - The method "remove", must search for data provided via a parameter, and remove the node if it is found. - The method "removeCurrent", must remove the node that is at the current reference. If the current reference is null, then this method does nothing. See images below for the concept. - All methods must have the public scope and their identifiers must match exactly what is defined above. - The method "addAfterCurrent", must create a new node with the data provided via a parameter and add it after the current reference. If the current reference is null, then do not add the data to the list. See images below for the concept. - All methods must have the public scope and their identifiers must match exactly what is defined above. - After either "add" or "addAfterCurrent" the integrity of the list must be maintained, and all links and references need to be properly set. - All the above must apply for full credit. - Create methods remove and removeCurrent. (10pts) - The method "remove", must search for data provided via a parameter, and remove the node if it is found. - The method "removeCurrent", must remove the node that is at the current reference. If the current reference is null, then this method does nothing. See images below for the concept. - All methods must have the public scope and their identifiers must match exactly what is defined above. - After either "remove" or "removeCurrent" the integrity of the list must be maintained, and all links and references need to be properly set. - All the above must apply for full credit. - Create the method print. (10pts) - This method must print all the data in the linked list to the console. - The method must have the public scope and their identifiers must match exactly what is defined above. - All the above must apply for full credit. - Create the method contains. (10pts) - This method returns true only if data provided via a parameter is contained in the list, and otherwise it returns false. - The method must have the public scope and their identifiers must match exactly what is defined above. - All the above must apply for full credit. - Coding Style. (10pts) - Code functionality organized within multiple methods other than the main method, and methods organized within multiple classes where appropriate. (5pts) - Readable Code (5pts) - Meaningful identifiers for data and methods. - Proper indentation that clearly identifies statements within the body of a class, a method, a branching statement, a loop statement, etc. - All the above must apply for full credit. - Comments. (10pts) - Your name in the file. (5pts) - At least 5 meaningful comments in addition to your name. These must describe the function of the code it is near. (5pts)

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Modern Database Management

Authors: Jeff Hoffer, Ramesh Venkataraman, Heikki Topi

12th edition

133544613, 978-0133544619

More Books

Students also viewed these Databases questions

Question

Draw the most stable conformer of the following molecule CH3 CH

Answered: 1 week ago