I am learning so please bear with me.
I'm working on this program for exception handling.
The program asks the user for a number between 1-100. If the number is within that range it simply prints it out. If the number is too high, too low, or a negative it throws an error message. Each exception of too high, too low, neg, should be a separate class that the driver program checks. I also need a "verify" class that checks the number entered is within the range by use of a constructor that has two int parameters, first int is low range of 1 and second int is high number of 100.
This is what I have so far...please don't be too harsh I'm new at this...what I don't understand is how the highlow class "calls" the error checking and basically what needs to be defined in those classes...any help is greatly appreciated!
I'm working on this program for exception handling.
The program asks the user for a number between 1-100. If the number is within that range it simply prints it out. If the number is too high, too low, or a negative it throws an error message. Each exception of too high, too low, neg, should be a separate class that the driver program checks. I also need a "verify" class that checks the number entered is within the range by use of a constructor that has two int parameters, first int is low range of 1 and second int is high number of 100.
This is what I have so far...please don't be too harsh I'm new at this...what I don't understand is how the highlow class "calls" the error checking and basically what needs to be defined in those classes...any help is greatly appreciated!