-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathPOO01.java
47 lines (36 loc) · 1.21 KB
/
POO01.java
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
package luco;
import java.util.Scanner;
/**
*
* @author Usuario
*/
public class POO01 {
/**
* @param args the command line arguments
*/
public static void main(String[] args) {
// TODO code application logic here
Scanner sc = new Scanner(System.in);
Libro l1 = new Libro();
//no eran necesarias
// String isbn = "0";
// String titulo = "aaa";
// String autor = "aaa";
// int pagina = 0;
//leer datos
System.out.println("Ingrese autor del libro");
l1.autor = sc.nextLine();
System.out.println("Ingrese Titulo del libro");
l1.titulo = sc.nextLine(); //next line por si es un titulo compuesto
System.out.println("Ingrese ISBN del libro");
l1.isbn = sc.next();
System.out.println("Ingrese numero de paginas del libro");
l1.pagina = sc.nextInt();
l1.MostrarLibro(l1.isbn, l1.titulo, l1.autor, l1.pagina);
}
}