Page 1 of 1

Programming Exercise #14_1: Instruction: 1. Use Notepad to create new text file named “EX14_1.java”. Enter the following

Posted: Sat May 14, 2022 7:20 pm
by answerhappygod
Programming Exercise 14 1 Instruction 1 Use Notepad To Create New Text File Named Ex14 1 Java Enter The Following 1
Programming Exercise 14 1 Instruction 1 Use Notepad To Create New Text File Named Ex14 1 Java Enter The Following 1 (88.12 KiB) Viewed 39 times
Programming Exercise #14_1: Instruction: 1. Use Notepad to create new text file named “EX14_1.java”. Enter the following two lines (be sure to replace YourFullName with your full name): // FileName: EX14_1.java // Programmer: Your FullName 2. A garden watering valve can measure the volume of water coming out of a hose. A user fixed the valve to allow only 0.015 gallon of water. Create a Java exception class named “Unmatched VolumeException” which will pass the following messages to a numerical controller. Condition volume >0.015 volume <0.015 Message Excessive volume. Insufficient volume. 3. In the “main” method, take an input of volume. Write a proper Java exception handling code to throw appropriate exception message. Make sure the output looks similar to the following. [Note: Be sure to use input an output dialog boxes; otherwise, you might receive zero.] Input Message ? Enter the volume: 0.018 Excessive volume. OK Cancel OK Jand Input Message ? Enter the volume: 0.014 Insufficient volume. OK Cancel OK and