Пример #1
0
        static void Main(string[] args)
        {
            Till myTill = new Till();

            myTill.Scan("AB");
            Console.WriteLine(myTill.Total());
        }
        static void Main(string[] args)
        {
            Console.WriteLine("Hello World!");

            Console.WriteLine("Below is a demo of the Till()");

            // Arrange
            Till till = new Till();

            // Act
            till.Scan("BCCbCcCCC");

            Console.WriteLine("Total cost = " + till.Total());      // Total cost = 165 for items "BCCbCcCCC"
        }
Пример #3
0
        static void Main(string[] args)
        {
            //Console.WriteLine("Hello World!");
            Console.WriteLine("Unit\t | Unit Price\t | Special");
            Console.WriteLine("A\t | 50\t\t | 3 for 130");
            Console.WriteLine("B\t | 30\t\t | 2 for 45");
            Console.WriteLine("C\t | 20\t\t | max 6 items allowed");
            Console.WriteLine("D\t | 15\t\t | \t \n");

            Till testtill = new Till();

            Console.WriteLine("Please Enter Product Unit:");
            String productunit = Console.ReadLine().ToUpper();

            testtill.Scan(productunit);
            Console.WriteLine("Total: " + testtill.Total());
        }