Ecet 370 Week 2 Lab 2 Essay

1025 Words Oct 9th, 2014 5 Pages
This pack of ECET 370 Week 2 Lab 2 consists of:

Exercise 1

Exercise 2

Exercise 3

Exercise 4

Exercise 5

Outputs

General Instructions

Exercises 1, 2, and 3 use the programs in DocSharing labeled “User-defined array list."

Exercise 4 uses the programs in DocSharing labeled “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
…show more content…
public ArrayList copy(): create a function that makes a deep copy to another ArrayList object.

Exercise 3: Using an array-based list Using the class ArrayList completed in the previous exercise, write a program that uses it to store 100 random numbers. Consider that each of these random numbers is an integer in the interval [0, 200]. Write the program in such a way that there are no number duplicates.

Exercise 4: Review of the library class java.util. ArrayList Create a project using the classes in the DocSharing area labeled “Using java.util.ArrayList." Compile it, run it, and review the code that is given carefully. This code is the complete program given in our lecture that tests the library class java.util.ArrayList.

Exercise 5: Using the library class java.util.ArrayList Rewrite Exercise 3 (above) using the class java.util.ArrayList to store the 100 random numbers. General Questions - General Academic Questions General Instructions

Exercises 1, 2, and 3 use the programs in DocSharing labeled “User-defined array list."

Exercise 4 uses the programs in DocSharing labeled “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

Related Documents