ECET 370 UOP Course Tutorial/Shoptutorial

ECET 370 UOP Course Tutorial/Shoptutorial

ECET 370 Entire Course

For more course tutorials visit
www.shoptutorial.com

ECET 370 Week 1 Lab 1
ECET 370 Week 2 Lab 2
ECET 370 Week 3 Lab 3 Linked Lists
ECET 370 Week 4 Lab 4 Complexity of Computational Problems
ECET 370 Week 5 Lab 5 Search Algorithms and Techniques
ECET 370 Week 7 Lab 7 Binary Trees
******************************************************************************************
ECET 370 Week 3 Lab 3 Linked Lists
For more course tutorials visit
www.shoptutorial.com
Exercises 1, 2, and 3 use the programs in DocSharinglabeled “User-defined linked list.”
Exercise 4 uses the programs in DocSharinglabeled “Using java.util.LinkedList.”
Exercise 1: Review of Linked Lists Create a project using the classes in the DocSharing area labeled “User-defined linked list.” Compile it, run it, and review the code that is given carefully. This code tests the LinkedList class provided in the lecture. Extend the class Main to test the functions isEmpty, search and remove of the class LinkedList.
Exercise 2: A User-Defined Linked List Modify the class LinkedList given in the lecture by adding to it the functions listed below for Exercise 2. In each case, the appropriate error message should be generated if an invalid condition occurs. a. toString(): modify the display function to overload the toString function of the Object class. b. int length(): create this function to determine the number of items in the list (accessor function). c. void clear(): create this function to remove all of the items from the list. After this operation is completed, the length of the list is zero. d. void insertEnd(int item): create this function to insert item at the end of the list. e. void replace(int location, int item): create this function to replace the item in the list at the position specified by location. The item should be replaced with item. f. int get(int location): create a...

Similar Essays