Skip to the content.
package com.bookshop.solid.lsp;

import java.math.BigDecimal;

/**
 * The contract: anything purchasable has a real price and can always be bought.
 * Implementations must honour that everywhere -- no "this subtype throws".
 */
public interface Purchasable {

    String title();

    BigDecimal price();
}

Raw file