Repository navigation
Expand file tree
/
Copy pathPrestamo.java
More file actions
70 lines (55 loc) · 1.72 KB
/
Copy pathPrestamo.java
File metadata and controls
70 lines (55 loc) · 1.72 KB
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
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
package biblioteca;
public class Prestamo {
private long codusuario;
private char tipomaterial;
private long codmaterial;
private String fechaprestamo;
private String fechadevolucion;
public Prestamo(long codusuario, char tipomaterial, long codmaterial, String fechaprestamo) {
this.codusuario = codusuario;
this.tipomaterial = tipomaterial;
this.codmaterial = codmaterial;
this.fechaprestamo = fechaprestamo;
}
public Prestamo(long codusuario, char tipomaterial, long codmaterial, String fechaprestamo, String fechadevolucion) {
this.codusuario = codusuario;
this.tipomaterial = tipomaterial;
this.codmaterial = codmaterial;
this.fechaprestamo = fechaprestamo;
this.fechadevolucion = fechadevolucion;
}
public long getCodusuario() {
return codusuario;
}
public void setCodusuario(long codusuario) {
this.codusuario = codusuario;
}
public char getTipomaterial() {
return tipomaterial;
}
public void setTipomaterial(char tipomaterial) {
this.tipomaterial = tipomaterial;
}
public long getCodmaterial() {
return codmaterial;
}
public void setCodmaterial(long codmaterial) {
this.codmaterial = codmaterial;
}
public String getFechaprestamo() {
return fechaprestamo;
}
public void setFechaprestamo(String fechaprestamo) {
this.fechaprestamo = fechaprestamo;
}
public String getFechadevolucion() {
return fechadevolucion;
}
public void setFechadevolucion(String fechadevolucion) {
this.fechadevolucion = fechadevolucion;
}
public String toString() {
return "Préstamo realizado al usuario "+codusuario+":\nTipo de material: " + tipomaterial + "\nCódigo: " + codmaterial
+ "\nFecha del préstamo: " + fechaprestamo + "\nFecha de devolución: " + fechadevolucion;
}
}