ECET 370 DEVRY Course Tutorial / Devrycart

ECET 370 DEVRY Course Tutorial / Devrycart

• Submitted By: rdhdrj
• Date Submitted: 08/20/2014 4:25 AM
• Category: Book Reports
• Words: 504
• Page: 3
• Views: 1

ECET 370 Entire Course (Devry)

For more course tutorials visit
www.ecet370.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 2 Lab 2 (Devry)

For more course tutorials visit
www.ecet370.com

General Instructions
Exercises 1, 2, and 3 use the programs in DocSharinglabeled “User-defined array list."
Exercise 4 uses the programs in DocSharinglabeled “Using java.util.ArrayList."
Exercise 1: Review of array-based lists Create a project using the classes in the DocSharing area labeled “User-defined array list." Compile it, run it, and review the code that is given carefully. This code tests the ArrayList class provided in the lecture.
Exercise 2: A user-defined array list Modify the class ArrayList 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. For example, an error message should be generated when trying to insert an item in a given location in the list and the location is out of range. a. ArrayList(int size): create a constructor that sets the size of the array list to the value passed in size (note that the class variable SIZE cannot be final anymore). b. int length(): create this function to determine the number of items in the list (accessor function). c. intgetSize(): create this function to determine the size of the list (accessor function). d. void clear(): create this function to remove all of the items from the list. After this operation, the length of the list is zero. e. void replace(int location, int item): create this...