Está en la página 1de 2

30/9/2014 Prueba.

java

E:\Programacion (2)\Clase21\Clase21\src\examen\pregunta1\Prueba.java

1 package examen.pregunta1;
2
3 import java.util.List;
4 import org.omg.PortableInterceptor.SYSTEM_EXCEPTION;
5
6 public class Prueba {
7
8 public static void main(String[] args) {
9 Prueba p = new Prueba();
10 p.logica();
11 }
12
13 public void logica() {
14 System.out.println("Logica");
15 Gestion g = new Gestion();
16 // Probar lectura
17 String archivo = "c:\\datos\\new.txt";
18 g.leerArchivo(archivo);
19 // Probar impresion
20 g.imprimePersonas();
21
22 System.out.println("RESPUESTA A LA PREG X");
23 List<Persona> l = g.getPersonasOrdenXNombreASCxCodigoDESC();
24 for ( Persona p : l) {
25 System.out.println( p );
26 }
27
28 List <Persona> pepe = g.getAlumnos(1);
29 for(int i = 0;i<pepe.size();i++){
30 System.out.println(pepe.get(i));
31 }
32
33 System.out.println("Profesor más monce : " + g.getMinRanking());
34
35 int [] ciclos = g.getAllCiclos();
36 for(int i = 0;i<ciclos.length;i++){
37 System.out.println("ciclo " + ciclos[i]);
38 }
39
40 g.eliminaMalosProfesores();
41
42
43
44
45 g.imprimeProfesores();
46
47 System.out.println("--------------------------------------------");
48 List<Persona> x = g.getPersonaOrdenXCodigo();
file:///C:/Users/USUARIO/Desktop/Prueba.html 1/2
30/9/2014 Prueba.java

49 for(Persona y : x){
50
51 System.out.println(y);
52 }
53
54 }
55 }
56

file:///C:/Users/USUARIO/Desktop/Prueba.html 2/2

También podría gustarte