Registros

Páginas: 2 (288 palabras) Publicado: 14 de diciembre de 2010
/*

* To change this template, choose Tools | Templates

* and open the template in the editor.

*/

package ejemploreload;

/**

*

* @author usuario

*/

import java.io.*;public class Programa {

public static Automovil carros[] = new Automovil [100];

public static int contador = 0;

public static BufferedReader br;

public static voidmain(String[] args) throws Exception{

br = new BufferedReader(

new InputStreamReader (System.in));

System.out.print("DIME TU NOMBRE: ");

Stringnombre = br.readLine();

System.out.println("Bienvenido " + nombre + "!");

int opcion = 0;

while (opcion != 4) {System.out.println("----------------------------- ");

System.out.println("***MENU*** ");

System.out.println("------------------------------");

System.out.println("1. AGREGAR UN AUTOMOVIL.");System.out.println("2. LISTAR AUTOMOVIL");

System.out.println("3. LISTAR AUTOMOVILES POR AÑO");

System.out.println("4. SALIR");System.out.println("----------------------------- ");

System.out.print("SU OPCION ES: ");

opcion = Integer.parseInt(br.readLine());

System.out.println("\tUSTEDSELECCIONO: " + opcion);

switch (opcion) {

case 1:

registrarAutomovil();

break;

case 2:listarAutomoviles();

}

}

}

public static void registrarAutomovil() throws Exception{

Automovil carro = new Automovil();System.out.println("----------------------------- ");

System.out.println("***REGISTRAR AUTOMOVIL*** ");

System.out.println("------------------------------");...
Leer documento completo

Regístrate para leer el documento completo.

Estos documentos también te pueden resultar útiles

  • registro
  • Registro
  • Registros
  • Registro
  • Registros
  • Registro
  • Registro
  • registro

Conviértase en miembro formal de Buenas Tareas

INSCRÍBETE - ES GRATIS