Question: In Java please. TIA Use ArrayList for this assignment. 1. Write a program that uses an ArrayList to store 100 random integers. Then write four

In Java please. TIA
Use ArrayList for this assignment. 1. Write a program that uses an ArrayList to store 100 random integers. Then write four methods: Write a method to print the all the elements in the ArrayList, but only 10 elements per line. - Write a method to return the index of the largest element. Write a method to return the index of the smallest element. Write a method to return the mean as a double. - Write a method to return the standard deviation as a double. (x1 - mean)2 + (x2 - mean)2 + ... + (Xi - mean)2 + ... + (xn - mean) 2 Standard Deviation In main method: - Call these methods and output the results. - Remove the largest element. - Replace the smallest element with the actually value of -99. - Output the ArrayList again. Sample run: 100 Elements in the ArrayList, organized by 10: 348 241 462 460 77 397 137 308 370 43 4 289 447 116 467 385 147 262 317 209 462 285 37 68 216 37 160 275 8 425 44 180 113 490 375 119 453 390 134 402 315 31 301 236 419 268 198 232 126 278 150 120 114 145 16 182 69 429 328 280 254 157 374 224 226 54 481 171 398 389 255 186 393 81 329 35 264 135 393 170 53 104 179 108 254 176 424 293 468 453 424 222 244 240 395 110 133 480 17 430 Mean: 245.72 Standard Deviation: 140.84 The largest element in the ArrayList is 490 at index 33. The smallest element in the ArrayList is 4 at index 10. After removing the largest element and replacing the smallest value with -99: 348 241 462 460 77 397 137 308 370 43 -99 289 447 116 467 385 147 262 317 209 462 285 37 68 216 37 160 275 8 425 44 180 113 375 119 453 390 134 402 315 31 301 236 419 268 198 232 126 278 150 120 114 145 16 182 69 429 328 280 254 157 374 224 226 54 481 171 398 389 255 196 39391 329 35 261 135 393170 53
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
