示例#1
0
        static void Main(string[] args)
        {
            List <Product> wholeOrder = default;

            UserInterface.GreetUser();
            Streams.DisplayMenuToUser();

            bool keepGoing = true;

            while (keepGoing)
            {
                UserInterface.AskForOrder();
                wholeOrder = Streams.AddToOrderList(Streams.ValidateUserInput());
                Console.WriteLine("Would you like to order anything else? (y/n)");
                string userInput = Console.ReadLine().ToLower();
                if (userInput == "n")
                {
                    keepGoing = false;
                }


                Console.WriteLine($"Your subtotal is {Payments.PrintDollar((SubtotalBill.SubTotalGetter(wholeOrder)))}");
                Console.WriteLine($"Your grand total is {Payments.PrintDollar((SubtotalBill.GrandTotalGetter(wholeOrder)))}");
                Payments.GetPaymentType();
                Receipt.DisplayReceipt();
            }
        }
示例#2
0
        public static double InstatiateSubTotal()
        {
            double subTotal = SubtotalBill.SubTotalGetter(wholeOrder);

            return(subTotal);
        }
示例#3
0
        public static double InstatiateGrandTotal()
        {
            double grandTotal = SubtotalBill.SubTotalGetter(wholeOrder) * 1.06;

            return(grandTotal);
        }