CSc 2310 Assignment #5

$30.00

Download Details:

  • Name: Homework-5-Array-List-y7opse.zip
  • Type: zip
  • Size: 15.44 KB

Category:

Description

Rate this product

Objectives:

  1. To gain experience with using the Java programming language by being able to build classes.

Description of program:

You are to write a program name array_list.java that will do the following:

  1. Prompt the user for a number that is greater than or equal to 50 (which serves as the minimum size of your ArrayList)
  2. Generate this amount of random number one at a time and insert this number (one at a time) into an ArrayList. You must insert these numbers in order (i.e. in their correct location). For example if you already have 3 numbers in the list as in 3, 6, 8 and your next randomly generated number is 5, your new list must be 3, 5, 6, 8 before you even generate another random number, and so on and so on.
  3. After you are finished, display the entire content of the ArrayList on the screen.

What to turn in:

Turn in:

  1. A disk (flash drive) with the files java and array_list.class or array_list.jar
  2. A printout of the java file.
  3. Make sure your name is clearly written on both the disk and the print out.