CIS 171 Java Programming

 

Chapter 13 – Assignment

 

Instructions:

 

This assignment will modify the program you created in Chapter 9.  It will incorporate Exception Handling into the program in order to perform data validation on the user's input.  The program will attempt to catch any invalid data using Exception Handling and handle the appropriate exceptions in a logical manner within a Catch block.

 

Part 1:

 

Modify the BankAccountTest class/program from Exercise 9 to use Exception Handling to ensure that the correct values are entered and processed in the program.

 

 

Hint:

 

  1. Use the Scanner class only in the BankAccountTest class. 
  2. Incorporate the user input process into a TRY-CATCH block that will listen for the most likely types of errors.

        Make sure String values are captured where required.

        Make sure integer values are captured where required.

        Make sure float values are captured where required.