From 2d94fe91aea08e30b01791754ecbcf6fbbbf25cb Mon Sep 17 00:00:00 2001 From: MarcUs7i <96580944+MarcUs7i@users.noreply.github.com> Date: Mon, 18 Nov 2024 09:13:37 +0100 Subject: [PATCH] Completed Program.cs --- CoffeeVendingMachines/Program.cs | 40 +++++++++++++++++++++++++++++++- 1 file changed, 39 insertions(+), 1 deletion(-) diff --git a/CoffeeVendingMachines/Program.cs b/CoffeeVendingMachines/Program.cs index 6306f53..c3de388 100644 --- a/CoffeeVendingMachines/Program.cs +++ b/CoffeeVendingMachines/Program.cs @@ -1,8 +1,46 @@ using System.Text; +using CoffeeVendingMachines; + // using CoffeeVendingMachines; Console.OutputEncoding = Encoding.UTF8; Console.WriteLine($"*** Coffee Slot Machine ***{Environment.NewLine}"); -// TODO +Run(); + +void Run() +{ + CoffeeVendingMachine the_machine = new CoffeeVendingMachine("1st Floor"); + + //best way to insert coins :) + the_machine.InsertCoin(CoinType.Cent05); + the_machine.InsertCoin(CoinType.Cent05); + + the_machine.InsertCoin(CoinType.Cent10); + the_machine.InsertCoin(CoinType.Cent10); + the_machine.InsertCoin(CoinType.Cent10); + + the_machine.InsertCoin(CoinType.Cent20); + the_machine.InsertCoin(CoinType.Cent20); + the_machine.InsertCoin(CoinType.Cent20); + the_machine.InsertCoin(CoinType.Cent20); + the_machine.InsertCoin(CoinType.Cent20); + + the_machine.InsertCoin(CoinType.Cent50); + the_machine.InsertCoin(CoinType.Cent50); + the_machine.InsertCoin(CoinType.Cent50); + the_machine.InsertCoin(CoinType.Cent50); + + the_machine.InsertCoin(CoinType.Euro01); + the_machine.InsertCoin(CoinType.Euro01); + the_machine.InsertCoin(CoinType.Euro01); + + the_machine.InsertCoin(CoinType.Euro02); + the_machine.InsertCoin(CoinType.Euro02); + the_machine.InsertCoin(CoinType.Euro02); + + the_machine.SelectProduct("Capuccino", out CoinDepot[]? change, out int? remainder); + + Console.WriteLine(the_machine); +} \ No newline at end of file