package employees;
import util.IntValidator;

public class DeptValidator implements IntValidator {

  @Override
  public boolean accept(int dept) {
    return dept > 0 && dept <= 5;
  }

}
/* Sample usage in Payroll

dept = KeyboardReader.getPromptedInt(
"Enter department: ", "Dept must be numeric",
new DeptValidator(), "Valid depts are 1 - 5");

*/
