Menu
unknown
java
10 months ago
4.0 kB
7
Indexable
import java.util.Scanner;
public class Menus {
public static int choice;
private static Scanner sc = new Scanner(System.in);
private static String input(String text){
System.out.println(text);
return sc.nextLine();
}
public static int menuBienvenida(){
System.out.println("Bienvenido al menú del Consecionario!");
System.out.println("Seleccione la opción deseada: ");
System.out.println("""
[1] - Opciones en Vehiculos.
[2] - Opciones en Clientes.
[3] - Opciones en Ventas.
[4] - Reportes y estadisticas.
[0] - Salir.
""");
choice = Integer.parseInt(input(String.valueOf(choice)));
return choice;
}
public static int menuVehiculos(){
System.out.println("""
Seleccione la opcion deseada en vehiculos:
[1] - Listar Vehiculos.
[2] - Agregar vehiculos.
[3] - Modificar vehiculos.
[4] - Eliminar vehiculo.
[5] - Filtrar vehiculos del inventario.
[6] - Mostrar detalles completos de un vehiculo.
[0] - Salir.
""");
choice = Integer.parseInt(input(String.valueOf(choice)));
return choice;
}
public static void despedida(){
System.out.println("Espero haberle sido de ayuda. Hasta la proxima.");
}
public static int menuModificarVehiculo(){
System.out.println("""
Seleccione lo qe desea modificar del vehiculo:
[1] - Precio
[2] - Kilometros.
[3] - Estado.
[4] - Atrás.
[0] - Salir.
""");
choice = Integer.parseInt(input(String.valueOf(choice)));
return choice;
}
public static int menuFiltroVehiculos(){
System.out.println("""
Seleccione el metodo a filtrar:
[1] - Marca.
[2] - Modelo.
[3] - Año.
[4] - Estado.
[5] - Rango de precio.
[6] - Rango Kilometros.
[7] - Atrás.
[0] - Salir.
""");
choice = Integer.parseInt(input(String.valueOf(choice)));
return choice;
}
public static int menuCliente(){
System.out.println("""
Seleccione la opcion deseada:
[1] - Registrar nuevo cliente.
[2] - Modificar cliente.
[3] - Eliminar cliente.
[4] - Buscar cliente.
[5] - Listar todos los clientes.
[6] - Ver historial de compra.
[7] - Atrás.
[0] - Salir.
""");
choice = Integer.parseInt(input(String.valueOf(choice)));
return choice;
}
public static int menuModificiarCliente(){
System.out.println("""
Seleccione que desea modificar del cliente:
[1] - Telefono.
[2] - Email.
[3] - Atrás.
[0] - Salir.
""");
choice = Integer.parseInt(input(String.valueOf(choice)));
return choice;
}
public static int menuBuscarCliente(){
System.out.println("""
Seleccione el metodo de busqueda:
[1] - Dni.
[2] - Nombre y/o apellido.
[3] - Telefono.
[4] - Email.
[5] - Atrás.
[0] - Salir.
""");
choice = Integer.parseInt(input(String.valueOf(choice)));
return choice;
}
public static int menuVentas(){
System.out.println("""
Seleccione la opción deseada:
[1] - Registrar nueva venta.
[2] - Buscar venta por id.
[3] - Listar todas las ventas.
[4] - Filtrar ventas por fechas.
[5] - Calcular comisiones por ventas.
[6] - Generar factura de venta.
[7] - Atras.
[0] - Salir
""");
choice = Integer.parseInt(input(String.valueOf(choice)));
return choice;
}
}Editor is loading...
Leave a Comment