Esempio n. 1
0
        static void Main(string[] args)
        {
            RealCustomer customer1 = new RealCustomer();

            customer1.Id             = 1;
            customer1.Name           = "Halil";
            customer1.SurName        = "Çakantimor";
            customer1.TcNo           = "1234784557";
            customer1.CustomerNumber = "12345";


            LegalCustomer customer2 = new LegalCustomer();

            customer2.Id             = 2;
            customer2.CompanyName    = "Çakantimor Holding";
            customer2.CustomerNumber = "54321";
            customer2.TaxNumber      = "147258369";



            Customer customer3 = new RealCustomer();
            Customer customer4 = new LegalCustomer();

            CustomerManager customerManager = new CustomerManager();

            customerManager.Add(customer1);
            customerManager.Add(customer2);
        }
Esempio n. 2
0
        static void Main(string[] args)
        {
            RealCustomer customer1 = new RealCustomer();

            customer1.Id             = 1;
            customer1.CustomerNumber = "12345";
            customer1.Name           = "elçin";
            customer1.LastName       = "sevim";
            customer1.TcNumber       = "1133422455";

            LegalCustomer customer2 = new LegalCustomer();

            customer2.Id             = 2;
            customer2.CustomerNumber = "22220";
            customer2.CompanyName    = "kodlama.io";
            customer2.TaxNumber      = "461654";


            Customer customer3 = new RealCustomer();
            Customer customer4 = new LegalCustomer();

            CustomerManager customerManager = new CustomerManager();

            customerManager.Add(customer1);
            customerManager.Add(customer2);
        }
Esempio n. 3
0
        static void Main(string[] args)
        {
            ReelCustomer reelCustomer = new ReelCustomer();

            reelCustomer.Name       = "Yusuf";
            reelCustomer.SurName    = "Kızılırmak";
            reelCustomer.Id         = 1;
            reelCustomer.IdentityNo = "231232";
            reelCustomer.CustomerNo = "12345";


            LegalCustomer legalCustomer1 = new LegalCustomer();

            legalCustomer1.Id         = 2;
            legalCustomer1.CustomerNo = "987654";
            legalCustomer1.FirmName   = "Kodlama";
            legalCustomer1.TaxNo      = "987";

            //base class implemete ettiği classın ref nosunu tutabilir
            //aynı sonucu verir.
            Customer customer3 = new ReelCustomer();// farklarına bak
            Customer customer4 = new LegalCustomer();


            CustomerManager customerManager = new CustomerManager();

            customerManager.Add(reelCustomer);
        }
Esempio n. 4
0
        static void Main(string[] args)
        {
            RealCustomer customer1 = new RealCustomer();

            customer1.CustomerId  = 1;
            customer1.CustomerNum = "123456";
            customer1.Name        = "Ayça";
            customer1.SurName     = "Tabakoğlu";
            customer1.TcNum       = "123789";

            LegalCustomer customer2 = new LegalCustomer();

            customer2.CustomerId  = 2;
            customer2.CustomerNum = "12236548";
            customer2.CompanyName = "Kodlamaio";
            customer2.TaxNum      = "123789789654";

            // Gerçek - Tüzel Müşteri
            //SOLID

            Customer customer3 = new RealCustomer(); // new = bellekteki referans no'su
            Customer customer4 = new LegalCustomer();

            CustomerManager customerManager = new CustomerManager();

            customerManager.Add(customer1);
            customerManager.Add(customer2);
        }