package condicionales;

public class ejemplos {
	
	public static void main(String[] args) {
		//1. Condicional IF.
		
		//Si el usuario es mayor de edad, puede entrar al CINE.
		
		int edad = 16;
		
		//boolean condicion = edad>18;
		
		if (edad>18) {
			System.out.println("Entro al cine");
		}
				
				
		
		//2. Condicional IF-ELSE
		
		//Si el usuario es mayor de edad entra al Karting y sino se queda de espectador.
		
		if (edad>18) {
			System.out.println("Entro al karting");
		}else {
			System.out.println("Soy un espectador");
		}
		
		//3. Condicional IF-ELSE-IF-ELSE (3 NIVELES... HASTA N NIVELES)
		
		//Si tiene entre 18 y 22 va a la clase 1,
		//... 23 25 clase 2.
		//... resto clase 3.
		
		if (edad>=18 && edad <= 22) { //	(18,22) [18,22]
			System.out.println("Clase 1");
		}else if (edad >= 23 && edad <= 25) {
			System.out.println("Clase 2");
		}else {
			System.out.println("Clase 3");
		}
		
		//----
		
		// Switch -> Condicional.
	}

}
