public class Producto {
private final String nombre;
private final String tipoUnidad;
private final Integer precio;
public Producto(String nombre, String tipoUnidad, Integer precio) {
this.nombre = nombre;
this.tipoUnidad = tipoUnidad;
this.precio = precio;
}
@Override
public String toString() {
return nombre + " - " + tipoUnidad + " - " + "S/. " + precio;
}
/**
* @return the nombre
*/
public String getNombre() {
return nombre;
}
/**
* @return the tipoUnidad
*/
public String getTipoUnidad() {
return tipoUnidad;
}
/**
* @return the precio
*/
public Integer getPrecio() {
return precio;
}
}