static void Main(string[] args) { Beverage beverage = new Espresso(); Console.WriteLine(beverage.getDescription() + " $" + beverage.cost()); Beverage beverage2 = new DarkRoast(); beverage2 = new Mocha(beverage2); beverage2 = new Mocha(beverage2); beverage2 = new Whip(beverage2); Console.WriteLine(beverage2.getDescription() + " $" + beverage2.cost()); Beverage beverage3 = new HouseBlend(); beverage3 = new Soy(beverage3); beverage3 = new Mocha(beverage3); beverage3 = new Whip(beverage3); Console.WriteLine(beverage3.getDescription() + " $" + beverage3.cost()); Console.ReadKey(); }
static void Main(string[] args) { Beverage myEspresso = new Espresso(); myEspresso = new Mocha(myEspresso); myEspresso = new Soy(myEspresso); myEspresso = new Whip(myEspresso); Console.WriteLine(myEspresso.getDescription() + " " + myEspresso.cost()); Console.ReadLine(); }
public static void Main(string[] args) { Beverage beverage = new Esprresso(); Console.WriteLine(beverage.getDescription() + "$" + beverage.cost()); Beverage beverage2 = new HouseBlend(); beverage2 = new Mocha(beverage2); beverage2 = new Mocha(beverage2); beverage2 = new Whip(beverage2); Console.WriteLine(beverage2.getDescription() + "$" + beverage2.cost()); Console.ReadLine(); }
static void Main(string[] args) { Beverage one = new DarkRoast(); one.setSize("tall"); one = new Mocha(one); one = new Mocha(one); Console.WriteLine(one.getDesciption().ToString() + ": ${0}", one.cost().ToString()); Beverage two = new Espresso(); two.setSize("grande"); Console.WriteLine(two.getDesciption().ToString() + ": ${0}", two.cost().ToString()); Beverage three = new HouseBlend(); three.setSize("venti"); three = new Soy(three); three = new Mocha(three); three = new Whip(three); Console.WriteLine(three.getDesciption() + ": ${0}", three.cost()); Console.Read(); }