static void Builder() { //the Meal Builder: MealBuilder mealBuilder = new MealBuilder(); Meal vegMeal = mealBuilder.prepareVegMeal(); Console.WriteLine("Veg Meal"); vegMeal.showItems(); Console.WriteLine("Total Cost: " + vegMeal.getCost()); Meal nonVegMeal = mealBuilder.prepareNonVegMeal(); Console.WriteLine("\n\nNon-Veg Meal"); nonVegMeal.showItems(); Console.WriteLine("Total Cost: " + nonVegMeal.getCost()); //the Computer Bulder Computer comp = new ComputerBuilder("500 GB", "2 GB").setBluetoothEnabled(true).setGraphicsCardEnabled(true).build(); }
public override void build(ComputerBuilder desktopBuilder) { desktopBuilder.BuildRam(); desktopBuilder.BuildProcessor(); desktopBuilder.BuildMousePad(); }
public abstract void build(ComputerBuilder computerBuilder);