import java.util.List;

/**
 * Los productos de la bodega, sin códigos repetidos, en el orden en que se agregaron.
 * Esqueleto de P1: elijan los campos y completen los métodos.
 */
public class Inventory {

    public Inventory() {
        // por hacer
    }

    /** Agrega un producto. Código repetido: IllegalArgumentException. */
    public void add(Product product) {
        throw new UnsupportedOperationException("por hacer");
    }

    public boolean contains(String code) {
        throw new UnsupportedOperationException("por hacer");
    }

    /** El producto con ese código. Si no existe: NoSuchElementException. */
    public Product find(String code) {
        throw new UnsupportedOperationException("por hacer");
    }

    /** Quita el producto con ese código y lo devuelve. Si no existe: NoSuchElementException. */
    public Product remove(String code) {
        throw new UnsupportedOperationException("por hacer");
    }

    public void addStock(String code, int quantity) {
        throw new UnsupportedOperationException("por hacer");
    }

    public void removeStock(String code, int quantity) {
        throw new UnsupportedOperationException("por hacer");
    }

    /** Los productos en orden de inserción, en una lista que no se puede modificar. */
    public List<Product> products() {
        throw new UnsupportedOperationException("por hacer");
    }

    public int size() {
        throw new UnsupportedOperationException("por hacer");
    }

    /** La suma de stockValueCents() de todos los productos. */
    public long totalValueCents() {
        throw new UnsupportedOperationException("por hacer");
    }

    /** Los productos con stock menor o igual que threshold, en orden de inserción. */
    public List<Product> lowStock(int threshold) {
        throw new UnsupportedOperationException("por hacer");
    }
}
