Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Create an ExtLinkedList class by extending the LinkedList class to i nclude the following methods and estimate the run-time complexity of each method. Please Help!

Create an ExtLinkedList class by extending the LinkedList class to include the following methods and estimate the run-time complexity of each method.

Please Help!

  1. public ExtLinkedList evenList() // gets the elements E in locations 0,2,4,6,... of this list and puts them in a new ExtLinkedList in that order and returns it // make sure to handle errors

  2. public ExtLinkedList intsersect (ExtLinkedList eli) // picks out elements that are common to this ExtLinkedList and eli// and returns them in the form of a new ExtLinkedList // once again, you can use equals () method // the new list should not have duplicate elements // handle errors or exceptional situations appropriately. // example: this: {1,3,4,4}, parameter : {1,4,5,7} then return {1,4}

Template:

import java.util.*; public class ExtLinkedList extends LinkedList { public ExtLinkedList evenList() { // gets the elements E in locations 0,2,4,6, of this list and puts them in a new ExtLinkedList //in that order and returns it make sure to handle errors } public ExtLinkedList intsersect (ExtLinkedList eli) { } }

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

Logics For Databases And Information Systems

Authors: Jan Chomicki ,Gunter Saake

1st Edition

1461375827, 978-1461375821

More Books

Students also viewed these Databases questions

Question

4. Explain why strategic planning is important to all managers.

Answered: 1 week ago

Question

Q.No.1 Explain Large scale map ? Q.No.2 Explain small scale map ?

Answered: 1 week ago