Esempio n. 1
0
        public static void CaseStudy1()
        {
            Custmore customer = new Custmore(101, "Abc", "Mumbai");
            LineItem laptop   = new LineItem(10001, 2, new Product(20002, "Hp", 450000));
            LineItem mobile   = new LineItem(10002, 3, new Product(3000, "1+", 45000));

            Order order1 = new Order(123, new DateTime(2019, 01, 05));

            order1.AddItem(laptop);
            order1.AddItem(mobile);

            customer.AddOrder(order1);

            InvoiceGenerator invoice = new InvoiceGenerator(customer);
        }
Esempio n. 2
0
        private static void FinalTest()
        {
            Customer Customer = new Customer(1001, "ABC", "Thane");
            LineItem laptop   = new LineItem(1001, 2, new Product(2000, "Lenova", 45000));
            LineItem mobile   = new LineItem(1002, 3, new Product(3000, "Moto E4", 10000));

            Order order = new Order(123, new DateTime(2019, 01, 05));

            order.AddItem(laptop);
            order.AddItem(mobile);
            Customer.AddOrders(order);
            InvoiceGenerator genrate = new InvoiceGenerator(Customer);

            Console.WriteLine("\nInvoice");
            Console.WriteLine(genrate.PrintInvoice());
        }