Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package me.parzibyte.sistemaventasspringboot;
- public class ProductoParaVender extends Producto {
- private Float cantidad;
- public ProductoParaVender(String nombre, String codigo, Float precio, Float existencia, Integer id, Float cantidad) {
- super(nombre, codigo, precio, existencia, id);
- this.cantidad = cantidad;
- }
- public ProductoParaVender(String nombre, String codigo, Float precio, Float existencia, Float cantidad) {
- super(nombre, codigo, precio, existencia);
- this.cantidad = cantidad;
- }
- public void aumentarCantidad() {
- this.cantidad++;
- }
- public Float getCantidad() {
- return cantidad;
- }
- public Float getTotal() {
- return this.getPrecio() * this.cantidad;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement