public void setTime(int h, int m, int s) {
        
        if((h>=0 && h<24) && (m>=0 && m<60) &&
           (s>=0 && s<60)) {
            
            hour = h;
            minute = m;
            second = s;            
        }
        
        else 
            throw new IllegalArgumentException(
                    "hour, minute and/or second was out of range");   
        
    }