static void Main(string[] args) { Card bronzeCard = new BronzeCard("Gosho", 150m, 200m); Card silverCard = new SilverCard("Pesho", 400m, 700m); Card goldenCard = new GoldenCard("Sasho", 1000m, 400m); PayDesk payDesk = new PayDesk(); payDesk.AddToList(bronzeCard); payDesk.AddToList(silverCard); payDesk.AddToList(goldenCard); Console.WriteLine(payDesk.ToString()); }
static void Main(string[] args) { var cashier = new Cashier(); var bronzeCard = new BronzeCard("Bronze", 0); var silverCard = new SilverCard("Silver", 600); var goldCard = new GoldCard("Gold", 1500); var receipts = new PurchaseInformaton[] { cashier.ProcessPurchase(150, bronzeCard), cashier.ProcessPurchase(850, silverCard), cashier.ProcessPurchase(1300, goldCard) }; foreach (var receipt in receipts) { Console.WriteLine(receipt); } }