public class ImproperFractionException extends Exception {

   private int top, bottom;
   private String message;

   public ImproperFractionException (int num, int denom) {
      top = num;
      bottom = denom;
      message = "Denominator "+denom+ " has to be greater than numerator "+num;
   }

   public int getTop() {
     return top;
   }

   public int getBottom() {
     return bottom;
   }

   public String getMessage() {
     return message;
   }
}
