Java Linked Lists

You are required, but not limited, to turn in the following source files:The files below are in the compressed zip.Assignment10.java (This file does not need to be modified) LinkedList.java (It needs to be modified) ListIterator.java (This file does not need to be modified)Requirements to get full credits in DocumentationIGNORE THIS STEP The assignment number, your name, StudentID, Lecture number, and a class description need to be included at the top of each file/class. A description of each method is also needed. Some additional comments inside of long methods (such as a “main” method) to explain codes that are hard to follow should be written. Code
must be written from scratch and any case of match will be reported to the Dean
and you will result in a failing grade for this course.IGNORE this step You can look at the Java programs in the text book to see how comments are added to programs.New Skills to be AppliedIn addition to what has been covered in previous assignments, the use of the following items, discussed in class, will probably be needed:Linked ListsProgram DescriptionClass Diagram:In the Assignment #10, you are given three files Assignment10.java, LinkedList.java, and ListIterator.java. You will need to add additional methods in the LinkedList class in the LinkedList.java file. The LinkedList will be tested using strings only.Specifically, the following methods must be implemented in the LinkedList class:(You should utilize listIterator() method already defined in the LinkedList class to obtain its LinkedListIterator object, and use the methods in the LinkedListIterator class to traverse from the first element to the last element of the linked list to define the following methods.) 1. public String toString()The toString method should concatenate strings in the linked list, and return a string of the following format:{ Apple Banana Melon Orange }Thus it starts with “{” and ends with “}”, and there is a space between strings and “{” or “}”. If the list is empty, it returns “{ }” with a space in between. Note that all elements in the linked list will be added in alphabetical order. 2. public int size()The size method returns the number of strings that the linked list contains at the time when this method is called.3. public void addElement(Object element)The addElement adds the parameter element into the linked list. The linked list should contain all elements (strings) in alphabetical order. Therefore, in this addElement method, a correct location to insert the parameter element needs to be searched and the element needs to be inserted in that location.4. public void removeElementsAtOddIndices( )The removeElementsAtOddIndices should remove objects at odd indices within the linked list. For instance, if the linked list contains { Apple Banana Melon Orange }, then after calling this method, the linked list will contains { Apple Melon } since Banana at the index 1 and Orange at the index 3 need to be removed. Each element within the linked list will can be labeled starting the index 0, and based on this assumption, elements should be removed. If the linked list does not contain any element, or contains only one element, then the method should not change its content.5. public void removeAdditionalOccurrences(Object element)The removeAdditionalOccurrences method should search the parameter object (a string in this case) in the linked list, then it should keep the first occurrence of the element, but it should remove any other elements that is same as the parameter object within the linked list if any. For instance, if the linked list contains { Apple Banana Banana Banana Melon Melon Orange }, then after calling removeAdditionalOccurrences(Banana), the linked list will become { Apple Banana Melon Melon Orange }.6. public Object searchByIndex(int index)The searchByIndex method should look for an object of the given parameter index and return it. If the parameter index is larger or smaller than the existing indices, it should throw an object of the IndexOutOfBoundsException class.7. public void searchAndIncrease(Object element, int howMany)The searchAndIncrease method should search the parameter object (a string), and if it is found, add the same object (a string) as many as the integer specified by the parameter howMany. For instance, if the linked list contains { Apple Banana Melon Orange }, and searchAndIncrease(Melon, 3) is called, then the linked list will contain { Apple Banana Melon Melon Melon Melon Orange } by adding Melon three times right after the found Melon. If the parameter element is not found in the linked list, or the value of howMany is 0 or less, then it should not change the content of the linked list.Test your LinkedList class with the given Assignment10.java file.It is recommended to test boundary cases such as the cases when the linked list is empty, when it contains only one element, when adding/removing at the beginning or at the end of the linked list.The files below are in the compressed zip.InputThe following files are the test cases that will be used as input for your program (Right-click and use “Save As”):Test Case #1Test Case #2Test Case #3Test Case #4OutputThe following files are the expected outputs of the corresponding input files from the previous section (Right-click and use “Save As”):Test Case #1Test Case #2Test Case #3Test Case #4Error HandlingYour program is expected to be robust enough to pass all test cases.
assignment_10.zip

Unformatted Attachment Preview

Don't use plagiarized sources. Get Your Custom Essay on
Java Linked Lists
Just from $13/Page
Order Essay


Purchase answer to see full
attachment

GradeAcers
Calculate your paper price
Pages (550 words)
Approximate price: -

Why Work with Us

Top Quality and Well-Researched Papers

We always make sure that writers follow all your instructions precisely. You can choose your academic level: high school, college/university or professional, and we will assign a writer who has a respective degree.

Professional and Experienced Academic Writers

We have a team of professional writers with experience in academic and business writing. Many are native speakers and able to perform any task for which you need help.

Free Unlimited Revisions

If you think we missed something, send your order for a free revision. You have 10 days to submit the order for review after you have received the final document. You can do this yourself after logging into your personal account or by contacting our support.

Prompt Delivery and 100% Money-Back-Guarantee

All papers are always delivered on time. In case we need more time to master your paper, we may contact you regarding the deadline extension. In case you cannot provide us with more time, a 100% refund is guaranteed.

Original & Confidential

We use several writing tools checks to ensure that all documents you receive are free from plagiarism. Our editors carefully review all quotations in the text. We also promise maximum confidentiality in all of our services.

24/7 Customer Support

Our support agents are available 24 hours a day 7 days a week and committed to providing you with the best customer experience. Get in touch whenever you need any assistance.

Try it now!

Calculate the price of your order

Total price:
$0.00

How it works?

Follow these simple steps to get your paper done

Place your order

Fill in the order form and provide all details of your assignment.

Proceed with the payment

Choose the payment system that suits you most.

Receive the final file

Once your paper is ready, we will email it to you.

Our Services

No need to work on your paper at night. Sleep tight, we will cover your back. We offer all kinds of writing services.

Essays

Essay Writing Service

No matter what kind of academic paper you need and how urgent you need it, you are welcome to choose your academic level and the type of your paper at an affordable price. We take care of all your paper needs and give a 24/7 customer care support system.

Admissions

Admission Essays & Business Writing Help

An admission essay is an essay or other written statement by a candidate, often a potential student enrolling in a college, university, or graduate school. You can be rest assurred that through our service we will write the best admission essay for you.

Reviews

Editing Support

Our academic writers and editors make the necessary changes to your paper so that it is polished. We also format your document by correctly quoting the sources and creating reference lists in the formats APA, Harvard, MLA, Chicago / Turabian.

Reviews

Revision Support

If you think your paper could be improved, you can request a review. In this case, your paper will be checked by the writer or assigned to an editor. You can use this option as many times as you see fit. This is free because we want you to be completely satisfied with the service offered.

Order your essay today and save 15% with the discount code DISCOUNT15