Question: For Java Write a Program that Meets the Following Requirements Calls a method that creates an Array with 100 Random Generated Integers Calls a method

For Java

Write a Program that Meets the Following Requirements

Calls a method that creates an Array with 100 Random Generated Integers

Calls a method that writes the elements of the array to a text file inside the Project Folder of the assignment. Relative File Addressing must be used. not absolute file addressing. This method should have appropriate IO Exception handling.

Calls a method that prompts the user to enter an index position of the array and returns the value of the array element at the entered index position. If the value entered by the user is not a valid integer, throw an" Input Mismatch Exception" that prompts the user of the problem and permits them the opportunity to input a correct integer or exit the program

When a valid integer value is entered, calls a method that receives the value that the user entered as an index position in the array. The method will display the corresponding value in the index position of the value entered. If the value entered by the user is outside of a valid index position in the array, throw an" Array Index Out Of Bounds Exception"

All exceptions should be detected in their associated methods and handled in the main method

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!