private void setCost() { if (beverage != null) { condimentCost += beverage.cost(); } }
public override double cost() { return(beverage.cost() + 0.10); }
public Condiment(Beverage beverage, Beverage condiment) : this(condiment.getDescription(), condiment.cost()) { this.beverage = beverage; setStuff(); }