Question: this is advance java. please when writing the code separate the class from the main. CT 2613 Advanced Java Assignment: Arraylist and Two-Dimensional Array Part

 this is advance java. please when writing the code separate the

this is advance java. please when writing the code separate the class from the main.

CT 2613 Advanced Java Assignment: Arraylist and Two-Dimensional Array Part A: ArrayList Assignment Write a program that allows you to enter a series of numbers (ints). Each time a new number is entered, add it to an ArrayList. Let the user stop the data entry by entering a -1 When data entry is done, display the contents of the list using your own for loop. (or for-each) Also, calculate and display the sum and the average of the elements in the list Remember that you can't store int values directly in an ArrayList -you have to use Integer (wrapper class) to declare your ArrayList. This won't work: ArrayList numbers.. Instead, you would either declare them like this: ArrayList numbers Or as an Arraylist of Strings and convert them to ints as needed. 1 don't recommend this.) Part B: two-dimensional array assignment. Write a program that will ask the user: For the number of rows in the array For the number of columns in the array Then the program should: . Declare and allocate an array of ints of that size . Fill the array (iterate thru every value with a nested loop) with random numbers between 1 and 9 . Display the two-d array appropriately

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!