my question really just pertains to where I should put the bit of code that checks to make sure the input is a whole number. Thanks to anyone who helps.
public static String getQuantity(String aQuantity){
while (isValidQuantity(aQuantity)== false ){
errorMessage += "Enter Valid quantity\n";
}
return aQuantity;
}
private static boolean isValidQuantity(String aQuantity){
boolean result = false;
try{
Double.parseDouble(aQuantity);
//here?//
result = true;
}catch(Exception ex){
result = false;
}
return result;
}