package proxy; public class ProductProxy implements ProductI { private ProductI prod; public ProductProxy(ProductI prod) { this.prod = prod; } if (!isDelivery()) { return "[NOT DELIVERED] " + prod.getName(); } return prod.getName(); } public int getPrice() { if (isDelivery()) { return prod.getPrice() - ProductI.DELIVERY_COST; } return prod.getPrice(); } public boolean isDelivery() { return prod.isDelivery(); } return getName() + ", $" + getPrice(); } }