mirror of
https://gitlab.com/tutorial-java-rafa-munoz/tutorial-java-2024-25/tutorialjava2024-25.git
synced 2025-11-09 18:03:09 +01:00
51 lines
812 B
Java
51 lines
812 B
Java
package tutorialJava.capitulo5.ejercicios.bloque02_ColeccionAntiguedades;
|
|
|
|
public class Antiguedad {
|
|
|
|
private int anio;
|
|
private String origen;
|
|
private float precio;
|
|
|
|
public Antiguedad() {
|
|
}
|
|
|
|
public Antiguedad(int anio, String origen, float precio) {
|
|
super();
|
|
this.anio = anio;
|
|
this.origen = origen;
|
|
this.precio = precio;
|
|
}
|
|
|
|
public int getAnio() {
|
|
return anio;
|
|
}
|
|
|
|
public void setAnio(int anio) {
|
|
this.anio = anio;
|
|
}
|
|
|
|
public String getOrigen() {
|
|
return origen;
|
|
}
|
|
|
|
public void setOrigen(String origen) {
|
|
this.origen = origen;
|
|
}
|
|
|
|
public float getPrecio() {
|
|
return precio;
|
|
}
|
|
|
|
public void setPrecio(float precio) {
|
|
this.precio = precio;
|
|
}
|
|
|
|
@Override
|
|
public String toString() {
|
|
return "Antiguedad [anio=" + anio + ", origen=" + origen + ", precio=" + precio + "]";
|
|
}
|
|
|
|
|
|
|
|
}
|