martes, 15 de octubre de 2013

Creación ArrayList

import java.util.*;
class Escuela
    {
      public static void main(String [] args)
        {             
          Profesor aux = new Profesor();
          int opcion = 0;
        char opc = 's';   
       ArrayList <Profesor> arrprofes = new ArrayList <Profesor>();
       while (opc == 's')
       {
    System.out.println("1.- altas ");
    System.out.println("2.- bajas ");
    System.out.println("4.- consultas ");
    System.out.println("5.- fin ");
    System.out.println("teclea la opcion deseada ? ");
    opcion = Leer.datoInt();
    switch(op)
     {
     case 1:
                        aux.altas(arrprofes);
      break;
     case 2:
                           aux.bajas(arrprofes);
      break;
     case 4:
                           aux.consultas(arrprofes);
      break;
     case 5:
           opc = 'n';
      break;
     default:
      break;
     }
    }  
        }
    }

No hay comentarios:

Publicar un comentario