static void Main(string[] args) { //Gerçek müşteri İndiviculCustomer customer1 = new İndiviculCustomer(); customer1.Id = 1; customer1.CustomerNumber = "12345"; customer1.FirstName = "Rüveyha"; customer1.LastName = "Rüzgar"; customer1.TcNumber = "12345678910"; //Tüzel müşteri CorparateCustomer customer2 = new CorparateCustomer(); customer2.Id = 2; customer2.CustomerNumber = "54321"; customer2.CompanyName = "Kodlama.io"; customer2.TaxName = "12345678910"; Customer customer3 = new İndiviculCustomer(); Customer customer4 = new CorparateCustomer(); CustomerManager customerManager = new CustomerManager(); customerManager.Add(customer1); customerManager.Add(customer2); //3 ve 4 ü de ekleyebiliriz.Kalıtım uygulandı. }
static void Main(string[] args) { //Gercek Musteri icin giris IndividualCustomer customer1 = new IndividualCustomer(); customer1.Id = 1; customer1.CustomerNo = "12345"; customer1.Name = "Enes"; customer1.Surname = "Turkmen"; customer1.TcNo = "12345678901"; //Tuzel musteri icin giris (kodlama.io) CorparateCustomer customer2 = new CorparateCustomer(); customer2.Id = 2; customer2.CustomerNo = "54321"; customer2.CompanyName = "Kodlama.io"; customer2.TaxNo = "1234567890"; Customer customer3 = new IndividualCustomer(); Customer customer4 = new CorparateCustomer(); CustomerManager customerManager = new CustomerManager(); customerManager.Add(customer1); customerManager.Add(customer2); customerManager.Add(customer3); customerManager.Add(customer4); }
static void Main(string[] args) { RealCustomer musteri1 = new RealCustomer(); musteri1.CustomerName = "Ahmet"; musteri1.CustomerSurname = "Yalamayısever"; musteri1.CustomerNumber = " 123"; musteri1.Id = 1; musteri1.IdentityNumber = "23333333"; CorparateCustomer musteri2 = new CorparateCustomer(); musteri2.Id = 2; musteri2.CustomerNumber = "322"; musteri2.CompanyName = "AmatistKonutları"; musteri2.TaxId = "2351"; Customer musteri3 = new CorparateCustomer(); Customer musteri4 = new RealCustomer(); //Customer her iki classı da tutar }