function to print overflow / filled / underflow accordingly
public static void check_and_print ( double required_time , double given_time ) { if ( required_time < given_time ) System . out . print ( " Overflow " ) ; else if ( required_time > given_time ) System . out . print ( " Underflow " ) ; else System . out . print ( " Filled " ) ; }