Multiple Exceptions with Array
I would like to learn, and need direction if possible please.
Here is my challenge.
I want to pull from an Array of multiple "error messages" when the user inputs the incorrect data.
This is my array:
Then I would create a class that displays one of the messages(easy enough I think ).
public class OrderMessages
public static void main(String args)
String errorMessages = new String;
errorMessages = "The Item is not numeric";
errorMessages = "The quantity is not numeric";
errorMessages = "The item number is too low";
errorMessages = "The item number is to high";
errorMessages = "The quantity ordered is too low";
errorMessages = "The quantity ordered is too high";
errorMessages = "The item number is not valid";
Then an Applet.
The user then inputs an item number (ie 1) then a quantity.
I then assign a price to it (i.e $0.89ea)., and caluculate the math..etc...
If he/she inputs the incorrect info as per my exception array, then the error is displayed.
I'm assuming the try and catch with multiple catches.
all wrapped in an Applet.
Trying to find the correct "starting point" has been my challenge.
I've tries a couple different approaches on paper so far, but they all seem to go nowhere.
Now, I'm more confused than ever.
yes, I am a mature student, and I am learning for fun.
if I am not using proper terms etc...please let me know..
Thank you in advance