Question: 2. Lab Assignment For today's lab you will be expected to write one Java program and alter two others. Additionally, in text files you will

 2. Lab Assignment For today's lab you will be expected to

2. Lab Assignment For today's lab you will be expected to write one Java program and alter two others. Additionally, in text files you will provide a written explanation of the tests that you ran on the programs you wrote or altered (a) Add Exceptions Description: The purpose of this is given two programs, Division2.java and Guess- Num.java add exceptions to them so they become more robust Division2.java: Simply takes 2 integers and divides the Part1 of lab is to add two exceptions to the code to deal with input that is not integers and deal with division by zero. Also you need to declare an exception to be thrown for the method divide GuessNum.java: Creates an array of 100 random numbers. Then while the user has not entered a negative number, asks the ser for an index and prints out the element of that array at that index. Add in an exception to deal with the user selecting an improper index. Note an improper index should not end the program For both programs please write up two text files Division2.txt and GuessNum.txt with what tests you ran to ensure that the programs work correctly NOTE: Input MismatchException is in java.util NOTE: You should add an addition Gauthor tag to each program you change. The eversion tag should then be overwritten because its a new version. (b) ReadMatrix Description: Asking the user for a text file read in a matrix and print the transpose to screen Specifications Filename: ReadMatrix.java Classname: ReadMatrix Main method Input: a file name from the user Output: Prints the matrix read in as a matrix and its transform Text File Assumptions: The size of the matrix wl be the first two numbers in the file on their own line. The items in the text file will be delineated by a space. Your program should be robust to numeric value

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!