/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package Escuela;

/**
 *
 * @author felix
 */
public class Fecha {
    private int dia;
    private int mes;
    private int anio;
    
    Fecha(int unDia, int unMes, int unAnio) {
        dia = (unDia > 0 && unDia <32) ? unDia : 1;
        mes = (unMes > 0 && unMes <13) ? unMes : 1;
        anio = unAnio > 0 ? unAnio : 1;
    }
    
    String formato() {
      return String.format("%02d/%02d/%04d", dia, mes, anio);  
    }
}
