-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathLibro.java
More file actions
36 lines (30 loc) · 690 Bytes
/
Copy pathLibro.java
File metadata and controls
36 lines (30 loc) · 690 Bytes
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
/**
* Clase de libro.
*
* @author (Alberto)
* @version (1.0)
*/
public class Libro
{
int id; // Identificador o clave del libro
String titulo;
String autor;
Genero genero;
int edicion;
Libro siguiente;
/**
* Constructor for objects of class Libro
*/
public Libro( int id, String titulo, String autor, Genero genero, int edicion)
{
this.id = id;
this.titulo = titulo;
this.autor = autor;
this.genero = genero;
this.edicion = edicion;
this.siguiente = null;
}
public String toString(){
return titulo+", "+autor+", "+ genero +", "+ edicion + ".";
}
}