A too small scale value

What should happen if the program user enters an invalid number? ImageResizer will need to show a message and put the cursor in the field that has the invalid number.

Add a method to check for a valid number that meets a minimum value.

  1. Add a private method called isValid(). It should take two parameters, a string called s and an integer called minVal, and return a boolean.
  2. Create a boolean called valid initialized to false.
  3. Create an integer called i set to the integer value of s using Integer’s parseInt() method.
  4. If i is greater than or equal to minValue, set valid to true.
  5. Return valid.
    ...
 
  ______________ isValid(____________) {
    ________ valid = __________;
    ________ i = _____________(____);
    if (_____________) {
      valid = ________;
    }
    return _________;
  }
    ...

Get hands-on with 1200+ tech skills courses.