Created
May 21, 2020 23:49
-
-
Save parzibyte/b89112266335b841592a73c6846f8206 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public static int solicitarIndice() { | |
Scanner sc = new Scanner(System.in); | |
System.out.println("Ingresa el número de producto: "); | |
return sc.nextInt(); | |
} | |
public static Producto solicitarProducto() { | |
Scanner sc = new Scanner(System.in); | |
System.out.println("Ingresa descripción"); | |
String descripcion = sc.nextLine(); | |
System.out.println("Ingresa precio:"); | |
double precio = sc.nextDouble(); | |
return new Producto(precio, descripcion); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment