static void Main(string[] args) { Console.OutputEncoding = Encoding.Unicode; Pizza pizza = new Pizza("Venezia", 6.5m, true); Kebap kebap = new Kebap("Ardana Kebap", 4.55m); Drink drink = new Drink("Cola", 3.5m, Volume._025l); Console.WriteLine(pizza); Console.WriteLine(kebap); Console.WriteLine(drink); Console.ReadKey(); }
static void Main(string[] args) { Console.OutputEncoding = Encoding.Unicode; Pizza pizza = new Pizza("Venezia", 6.5m, true); Kebap kebap = new Kebap("Ardana Kebap", 4.55m); Drink drink = new Drink("Cola", 3.5m, Volume._025l); Console.WriteLine(pizza); Console.WriteLine($" Preparation time: {pizza.GetMinutes()} min\n"); Console.WriteLine(kebap); Console.WriteLine($" Preparation time: {kebap.GetMinutes()} min\n"); Console.WriteLine(drink); Console.WriteLine($" Preparation time: {drink.GetMinutes()} min\n"); Console.ReadKey(); }
static void Main(string[] args) { Console.OutputEncoding = Encoding.Unicode; Product pizza = new Pizza("Venezia", 6.5m, true); Product kebap = new Kebap("Ardana Kebap", 4.55m); Product drink = new Drink("Cola", 3.5m, Volume._05l); List <Product> products = new List <Product>(); products.Add(pizza); products.Add(kebap); products.Add(drink); foreach (Product p in products) { Console.WriteLine(p); Console.WriteLine($" Preparation time: {p.GetMinutes()} min"); Console.WriteLine($" Ingredients price: {p.GetIngredientsCosts():C2}"); } Console.ReadKey(); }
static void Main(string[] args) { Pizza pizza = new Pizza("Venezia", 6.5m, true); Kebap kebap = new Kebap("Ardana Kebap", 4.55m); Drink drink = new Drink("Cola", 3.5m, Volume._025l); }