You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
abstract Burger implements Item:
abstract float price();
public Packing packing() {
return new Wrapper();
}
===============================
abstract ColdDrink implements Item:
abstract float price();
public Packing packing() {
return new Bottle();
}
Classes:
a. VegBurger //extends from Burger
b. ChickenBurger //extends from Burger
c. Pepsi //extends ColdDrink
d. Coke // extends ColdDrink
e. Meal // has an list of items in List<Item> items.
f. MealBuilder //builds veg & non-veg meals.
g. MealBuilderClient //demo for the builder pattern.