Description
Objectives:
- 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:
- Prompt the user for a number that is greater than or equal to 50 (which serves as the minimum size of your ArrayList)
- 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.
- After you are finished, display the entire content of the ArrayList on the screen.
What to turn in:
Turn in:
- A disk (flash drive) with the files javaandarray_list.classorarray_list.jar
- A printout of the javafile.
- Make sure your name is clearly written on both the disk and the print out.