예제 #1
0
        static void Main(string[] args)
        {
            Days days;

            days = Days.Monday;
            for (int i = 0; i < 6; i++)
            {
                Console.WriteLine(days);
                days++;
            }
            Person ann;

            ann.name = "Ann";
            ann.age  = 19;
            ann.DisplayInfo();

            Product     apple       = new Product("apple", 30);
            Product     pen         = new Product("pen", 10);
            Product     cat         = new Product("cat", 1000);
            Waybill     waybill1    = new Waybill();
            Waybill     waybill2    = new Waybill();
            Check       check1      = new Check(1999, 123);
            Check       check2      = new Check(2003, 321);
            Bookkeeping bookkeeping = new Bookkeeping();

            bookkeeping.Add(waybill1, check1);
            bookkeeping.Add(waybill2, check2);
            waybill1.products.Add(apple); waybill1.products.Add(apple); waybill1.products.Add(pen);
            waybill2.products.Add(pen); waybill2.products.Add(cat);
            bookkeeping.Output();
            Controller controller = new Controller();

            Console.WriteLine("\nCost of a product: " + controller.FindsProduct(bookkeeping, "cat"));
            Console.WriteLine("Quantity of checks: " + controller.CheckNumber(bookkeeping));
            controller.FindDate(bookkeeping);
            bookkeeping.Remove(1);
            bookkeeping.Output();
        }
예제 #2
0
 public void Add(Waybill wb, Check ch)
 {
     waybill.Add(wb);
     checks.Add(ch);
 }