Function to calculate time taken
static double cal_time ( double dist , double speed ) { System . out . print ( " Distance ( km ) : "+ dist) ; System . out . print ( " Speed ( km / hr ) : " + speed) ; return speed * dist ; }