public LemonadeStand(recipe r) { this.pos = 0; money = 15; ingredientsInStock = Lemonade.InstantiateLemonade(); currentRecipe = r; pricePerCup = .25; this.pitcher = new Pitcher(r); pitcher.cups = 0; }
public LemonadeStand(recipe r, int pos) { //position it writes to this.pos = pos; money = 15; ingredientsInStock = Lemonade.InstantiateLemonade(); currentRecipe = r; pricePerCup = .25; this.pitcher = new Pitcher(r); pitcher.cups = 0; }
public void buyItems() { recipe stock = Lemonade.InstantiateLemonade(); double [] lemons = UI.promptForMoney("Lemon", .10); double [] sugar = UI.promptForMoney("Sugar", .12); double [] ice = UI.promptForMoney("Ice Cube", .01); this.pricePerCup = UI.promptForDouble("Price / Cup: "); stock.Lemon += (int)lemons[0]; stock.Sugar += (int)sugar[0]; stock.Ice += (int)ice[0]; this.money -= lemons[1] + sugar[1] + ice[1]; this.stockItems(stock); }