
package utilizacionalternativasimple;

import java.io.BufferedReader;
import java.io.InputStreamReader;


public class UtilizacionAlternativaSimple {

    
    public static void main(String[] args) {
        
        byte nota = 0;
        String tareaEntregada = "";
        BufferedReader bufferedReader = new BufferedReader(new InputStreamReader(System.in));
       
        try {
              System.out.print("Introduzca nota obtenida: ");
              nota = (byte)Integer.parseInt(bufferedReader.readLine());
              System.out.print("Se han entregado las tareas (S/N): ");
              tareaEntregada = bufferedReader.readLine(); 
        } catch (Exception e)
        {
            System.out.println(e.getMessage());
        }
        
        if ( nota >= 5 && (tareaEntregada.charAt(0) == 'S' || tareaEntregada.charAt(0) == 's'))
        {
            System.out.println("Aprobado");
        }
        else
        {
            System.out.println("Suspendido");
        }            
    }
    
}
