Java help!!  Consider the generic singly linked list as defined in class via interface GenericList with implementing classes ElementNode and EmptyNode. Code available on GitHub (Links to an external site.). Implement the method GenericList subList(int start, int end) for this list. The method takes a starting index start and ending index end. The item at start should be included in the resulting list, along with all items up to but not including the item at end. List items are numbered from 0. If start and end are equal, the returned list is empty. Be sure to appropriately handle all invalid inputs. Document all error handling appropriately. subList() does not mutate the underlying list; it returns a new list. You may define an additional method or methods on GenericList as part of your solution if you need to. Do not use loops; your solution must be recursive. For this question, no need to do anything with ListADT/ListADTImpl -- just the implementation in ElementNode and EmptyNode

Computer Networking: A Top-Down Approach (7th Edition)
7th Edition
ISBN:9780133594140
Author:James Kurose, Keith Ross
Publisher:James Kurose, Keith Ross
Chapter1: Computer Networks And The Internet
Section: Chapter Questions
Problem R1RQ: What is the difference between a host and an end system? List several different types of end...
icon
Related questions
Question
100%

Java help!! 

Consider the generic singly linked list as defined in class via interface GenericList<T> with implementing classes ElementNode<T> and EmptyNode<T>. Code available on GitHub (Links to an external site.). Implement the method GenericList<T> subList(int start, int end) for this list. The method takes a starting index start and ending index end. The item at start should be included in the resulting list, along with all items up to but not including the item at end. List items are numbered from 0. If start and end are equal, the returned list is empty.

  • Be sure to appropriately handle all invalid inputs. Document all error handling appropriately.
  • subList() does not mutate the underlying list; it returns a new list.
  • You may define an additional method or methods on GenericList<T> as part of your solution if you need to.
  • Do not use loops; your solution must be recursive.
  • For this question, no need to do anything with ListADT/ListADTImpl -- just the implementation in ElementNode and EmptyNode.
 
Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 2 steps with 1 images

Blurred answer
Recommended textbooks for you
Computer Networking: A Top-Down Approach (7th Edi…
Computer Networking: A Top-Down Approach (7th Edi…
Computer Engineering
ISBN:
9780133594140
Author:
James Kurose, Keith Ross
Publisher:
PEARSON
Computer Organization and Design MIPS Edition, Fi…
Computer Organization and Design MIPS Edition, Fi…
Computer Engineering
ISBN:
9780124077263
Author:
David A. Patterson, John L. Hennessy
Publisher:
Elsevier Science
Network+ Guide to Networks (MindTap Course List)
Network+ Guide to Networks (MindTap Course List)
Computer Engineering
ISBN:
9781337569330
Author:
Jill West, Tamara Dean, Jean Andrews
Publisher:
Cengage Learning
Concepts of Database Management
Concepts of Database Management
Computer Engineering
ISBN:
9781337093422
Author:
Joy L. Starks, Philip J. Pratt, Mary Z. Last
Publisher:
Cengage Learning
Prelude to Programming
Prelude to Programming
Computer Engineering
ISBN:
9780133750423
Author:
VENIT, Stewart
Publisher:
Pearson Education
Sc Business Data Communications and Networking, T…
Sc Business Data Communications and Networking, T…
Computer Engineering
ISBN:
9781119368830
Author:
FITZGERALD
Publisher:
WILEY