public int numberOfMeals() { int retnumberOfMeals = 0; for (OrderOfDish dish : this.orderDish) { retnumberOfMeals += dish.getquantity(); } return retnumberOfMeals; }
public void addDish(OrderOfDish orderDish) { this.orderDish.add(orderDish); if (this.expectedcookTime < orderDish.gestDish().getdishExpectedCookTime()) { this.expectedcookTime = orderDish.gestDish().getdishExpectedCookTime(); } this.difficultyRating = 0; this.setDifficultyRating(); }
public long calculateCookTime(OrderOfDish orderDish) { long res = 0; long quantity = (long) orderDish.getquantity(); res = res + (orderDish.gestDish().getdishExpectedCookTime() * quantity); return res; }