feat(ch 5): example & ex added

This commit is contained in:
Rafa Muñoz
2024-12-03 09:37:36 +01:00
parent 38fe9675d3
commit 6d5b6d56d5
13 changed files with 517 additions and 3 deletions

View File

@@ -0,0 +1,29 @@
package tutorialJava.capitulo5.ejercicios.bloque02_articulosComestibles;
public class ArtPerecedero extends Articulo {
private String fechaCaducidad;
public ArtPerecedero() {
}
public ArtPerecedero(String codigo, String nombre, float precio) {
super(codigo, nombre, precio);
}
public String getFechaCaducidad() {
return fechaCaducidad;
}
public void setFechaCaducidad(String fechaCaducidad) {
this.fechaCaducidad = fechaCaducidad;
}
@Override
public String toString() {
return "ArtPerecedero [fechaCaducidad=" + fechaCaducidad + ", getCodigo()=" + getCodigo() + ", getNombre()="
+ getNombre() + ", getPrecio()=" + getPrecio() + "]";
}
}