Question: This week we will be practicing using exceptions Getting Started To start this exercise, you should: 1. Open eclipse and start a new Java project

This week we will be practicing using exceptions Getting Started To start this exercise, you should: 1. Open eclipse and start a new Java project named Lab09 2. Add a Class (named TestScore) to this project, and copy the contents of the TestScore.java file provided into it. Requirements TestScore.java A very simple "driver" class which you can use as a base. The problem description is to obtain a single "valid" test score from the user. "Valid" means that it is a floating point (or integer) in its format, and that this number is in the range [0, 100] Your job is to add the necessary components to the program file so that the specification above is met. Suggested components: 1. a String variable 2. a boolean variable 3. a do loop 4. an if statement 5. a try and a catch block 6. Remember all of the numeric parse methods throw a NumberFormatException when a given strings format does not match the types " form". Your finished program will produce output / runs similar to: Please enter a test score [O, 100] : -1 Please enter a test score [0, 100]: 101 Please enter a test score [0, 100] : hgwells Please enter a numeric test score [O, 100] : 78.5 The valid score entered was 78.5 And must not "crash" on invalid input
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
