Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import java.util.*;
- public class main {
- public static void main(String[] args){
- RegistroVehiculo gestion = new RegistroVehiculo();
- int op;
- do{
- op = menu();
- switch (op){
- case 1:
- op = submenu();
- switch (op){
- case 1:
- String mat;
- int plazas;
- System.out.println("Matricula: ");
- Scanner tecla = new Scanner(System.in);
- mat = tecla.next();
- System.out.println("Plazas: ");
- plazas = tecla.nextInt();
- break;
- case 2:
- break;
- case 3:
- break;
- case 4:
- break;
- }
- break;
- case 2:
- break;
- case 3:
- break;
- }
- }while(op != 4);
- }
- public static short menu(){
- Scanner tecla = new Scanner(System.in);
- System.out.println("1- Añadir Vehiculo\n2- Obtener precio alquiler\n3- Mostrar todos los precios\n4- Salir");
- return tecla.nextShort();
- }
- public static short submenu(){
- Scanner tecla = new Scanner(System.in);
- System.out.println("1- Añadir Vehiculo\n2- Obtener precio alquiler\n3- Mostrar todos los precios\n4- Salir");
- return tecla.nextShort();
- }
- }
Add Comment
Please, Sign In to add comment