Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

this program is for Eclipse IDE, kindly make the solutions accordingly You are permitted to use your notes, the textbook, and anything posted on the

image text in transcribed

this program is for Eclipse IDE, kindly make the solutions accordingly

You are permitted to use your notes, the textbook, and anything posted on the course webpage. You may also use your notes and textbook from CS 141. Students whose native language is not English may consult a dictionary. You can request problem clarifications from me, but may not discuss this exam with anyone else or consult other resources while you are taking it. a 1. (5 points) Add each of the following methods to the OurList interface. (a) firstIndexAfter, which takes a value and an integer index. The method returns the index of the first time the value appears in the list strictly after the given index. (Note that the returned index should be counted from the beginning of the list, not the start location.) If the value doesn't appear after the given index, the method returns -1. (b) moveLater, which takes a value and moves the first occurrence of that value one position later in the list. Thus, calling it on the list (A, B, "C") with argument "A would change the list to (B, A, C). If the first occurrence is currently the last value in the list, the list is unchanged. If the value doesn't occur in the list, the method throws a NoSuchElementException. 2. (20 points) Write test cases for the methods listed in the previous problem in OurListTest. 3. (20 points) Implement the methods listed in problem 1 as part of the array-based list in OurArrayList. 4. (20 points) Implement the methods listed in problem 1 as part of the linked list in OurLinkedList. 5. (15 points) Give the running time in Rio n notot

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

Students also viewed these Databases questions

Question

8. Provide recommendations for how to manage knowledge.

Answered: 1 week ago