static void Main(string[] args)
        {
            Customer customer1 = new Customer();

            customer1.Id      = 1;
            customer1.Name    = "Jason";
            customer1.Surname = "Allen";

            Customer customer2 = new Customer();

            customer2.Id      = 2;
            customer2.Name    = "Kevin";
            customer2.Surname = "Bell";

            Customer customer3 = new Customer();

            customer3.Id      = 3;
            customer3.Name    = "Patricia";
            customer3.Surname = "Carter";

            Customer[] customers = new Customer[] { customer1, customer2, customer3 };

            CustomerManager customerManager = new CustomerManager();

            customerManager.CustomerAdd(customer1);
            customerManager.CustomerAdd(customer2);
            customerManager.CustomerAdd(customer3);
            customerManager.CustomerListing();
            Console.WriteLine("New List --------------------");
            customerManager.CustomerDelete(customer1);
            customerManager.CustomerDelete(customer2);
            customerManager.CustomerListing();
        }
Beispiel #2
0
        static void Main(string[] args)
        {
            Customer customer1 = new Customer();

            customer1.Id       = 1234567810;
            customer1.UserName = "******";
            customer1.SurName  = "Sazak";
            customer1.Password = "******";

            Customer customer2 = new Customer();

            customer2.Id       = 1784561230;
            customer2.UserName = "******";
            customer2.SurName  = "Musk";
            customer2.Password = "******";

            Customer customer3 = new Customer();

            customer3.Id       = 1830541450;
            customer3.UserName = "******";
            customer3.SurName  = "Bezos";
            customer3.Password = "******";

            Customer customer4 = new Customer();

            customer4.Id       = 1830541450;
            customer4.UserName = "******";
            customer4.SurName  = "Koç";
            customer4.Password = "******";

            Customer[] customers = new Customer[] { customer1, customer2, customer3, customer4 };


            Console.WriteLine("---Hethod kullanarak ekleme---");
            CustomerManager customerManager = new CustomerManager();

            customerManager.CustomerAdd(customer1);
            customerManager.CustomerAdd(customer2);
            customerManager.CustomerAdd(customer3);
            customerManager.CustomerAdd(customer4);


            // Console.WriteLine("---Method kullanarak listeleme---"); //1.yol uzun
            //CustomerManager customerlist = new CustomerManager();

            /* customerManager.CustomerList(customer1);
            *  customerManager.CustomerList(customer2);
            *  customerManager.CustomerList(customer3);
            *  customerManager.CustomerList(customer4); */


            Console.WriteLine("müşteri listeleme");
            customerManager.CustomerList(customers);

            Console.WriteLine("müşteri silme");
            customerManager.CustomerDelete(customer1);
            customerManager.CustomerDelete(customer2);
            customerManager.CustomerDelete(customer3);
            customerManager.CustomerDelete(customer4);
        }
        static void Main(string[] args)
        {
            Customer customer = new Customer()
            {
                Id = 862, Age = 25, Name = "Halil", Phone = 123456789
            };
            Customer customer1 = new Customer()
            {
                Id = 546, Age = 30, Name = "Engin", Phone = 123456798
            };
            Customer customer2 = new Customer()
            {
                Id = 987, Age = 56, Name = "Ali", Phone = 123456987
            };

            Customer[] customers = new Customer[] { customer, customer1, customer2 };


            foreach (var cst in customers)
            {
                Console.WriteLine("İsim : " + cst.Name + " --- " + "Yaş : " + cst.Age + " --- " + "Telefon : " + cst.Phone);
            }

            CustomerManager customerManager = new CustomerManager();

            customerManager.CustomerAdd();
            customerManager.CustomerDelete();
        }
Beispiel #4
0
        static void Main(string[] args)
        {
            Customer customer1 = new Customer();

            customer1.CustomerName     = "Elyase";
            customer1.CustomerLastName = "Keceli";
            customer1.TcNo             = "11111111111";
            customer1.PlaceOfBirth     = "Ordu";

            Customer customer2 = new Customer();

            customer2.CustomerName     = "Fatih";
            customer2.CustomerLastName = "Keceli";
            customer2.TcNo             = "11111111112";
            customer2.PlaceOfBirth     = "Ordu";

            Customer customer3 = new Customer();

            customer3.CustomerName     = "Furkan";
            customer3.CustomerLastName = "Keceli";
            customer3.TcNo             = "11111111113";
            customer3.PlaceOfBirth     = "Ordu";

            Customer customer4 = new Customer();

            customer4.CustomerName     = "Burak";
            customer4.CustomerLastName = "Keceli";
            customer4.TcNo             = "11111111114";
            customer4.PlaceOfBirth     = "Ordu";

            Customer[] customers = new Customer[] { customer1, customer2, customer3, customer4 };

            foreach (Customer customer in customers)
            {
                Console.WriteLine(customer.CustomerName);
            }
            Console.WriteLine("--------");
            CustomerManager customerManager = new CustomerManager();

            customerManager.CustomerAdd(customer1);
            customerManager.CustomerAdd(customer2);
            customerManager.CustomerAdd(customer3);
            customerManager.CustomerAdd(customer4);
            customerManager.CustomerDelete(customer1);
            customerManager.CustomerList(customer4);
        }
Beispiel #5
0
        static void Main(string[] args)
        {
            Customer customer = new Customer();

            customer.CustomerId             = 1;
            customer.CustomerNameSurname    = "Ali YILDIZ";
            customer.CustomerAccountNo      = 2723589;
            customer.CustomerAccountBalance = 600;

            Customer customer2 = new Customer();

            customer2.CustomerId             = 2;
            customer2.CustomerNameSurname    = "Ayşe YILDIZ";
            customer2.CustomerAccountNo      = 2723590;
            customer2.CustomerAccountBalance = 102000;

            Customer customer3 = new Customer();

            customer3.CustomerId             = 3;
            customer3.CustomerNameSurname    = "Erkin YILMAZ";
            customer3.CustomerAccountNo      = 2723591;
            customer3.CustomerAccountBalance = 350000;

            Customer customer4 = new Customer();

            customer4.CustomerId             = 4;
            customer4.CustomerNameSurname    = "Ahmet KUŞ";
            customer4.CustomerAccountNo      = 2723592;
            customer4.CustomerAccountBalance = 359000;

            Customer[] customers = new Customer[] { customer, customer2, customer3 };

            CustomerManager customerManager = new CustomerManager();

            customerManager.CustomerAdd(customers); //çoklu müşteri ekleme method overloading ile
            customerManager.CustomerAdd(customer4); //tekli müşteri ekleme method overloading ile

            customerManager.CustomerList();
            customerManager.CustomerRemove(customer2);
            customerManager.CustomerList();
            customer.CustomerAccountBalance += 255;
            customerManager.CustomerUpdate(customer);
            customerManager.CustomerList();
        }
Beispiel #6
0
        static void Main(string[] args)
        {
            Customer customer1 = new Customer();

            customer1.Id         = 001;
            customer1.Name       = "Burak";
            customer1.BankNumber = 33432;
            customer1.CallNumber = "0 111 111 1111 ";

            Customer customer2 = new Customer();

            customer2.Id         = 002;
            customer2.Name       = "James";
            customer2.BankNumber = 33789;
            customer2.CallNumber = "0 222 222 2222 ";

            Customer customer3 = new Customer();

            customer3.Id         = 003;
            customer3.Name       = "Holmes";
            customer3.BankNumber = 33112;
            customer3.CallNumber = "0 333 333 3333 ";

            Customer[] customers = new Customer[] { customer1, customer2, customer3 };



            CustomerManager customerManager = new CustomerManager();


            Console.WriteLine("---------------Banka Yönetim Sistemi------------");

            Console.WriteLine("1-->Müşteri Ekleme");
            Console.WriteLine("2-->Müşteri Silme");
            Console.WriteLine("3-->Müşterileri Listele");

            Console.WriteLine("Yapmak İstediğiniz İşlemi Giriniz");
            string operation = Console.ReadLine();

            switch (operation)
            {
            case "1":
                customerManager.CustomerAdd(customer1);
                break;

            case "2":
                customerManager.CustomerDel(customer2);
                break;

            case "3":
                customerManager.CustomerList(customers);     //
                break;
            }
        }
Beispiel #7
0
        static void Main(string[] args)
        {
            Customer customer1 = new Customer();

            customer1.CustomerId       = 1;
            customer1.CustomerName     = "ece";
            customer1.CustomerLastName = "ozaydin";


            Customer customer2 = new Customer();

            customer2.CustomerId       = 2;
            customer2.CustomerName     = "yildiz";
            customer2.CustomerLastName = "ozaydin";


            Customer customer3 = new Customer();

            customer3.CustomerId       = 3;
            customer3.CustomerName     = "elif";
            customer3.CustomerLastName = "ozaydin";



            CustomerManager customerManager1 = new CustomerManager();

            customerManager1.CustomerAdd(customer1);
            customerManager1.CustomerAdd(customer2);
            customerManager1.CustomerAdd(customer3);

            Console.WriteLine("-----Customer List--------");

            List <Customer> listCustomer = new List <Customer> {
                customer1, customer2, customer3
            };

            customerManager1.CustomerList(listCustomer);

            Console.ReadLine();
        }
Beispiel #8
0
        static void Main(string[] args)
        {
            CustomerManager customerManager = new CustomerManager();

            Customer customer1 = new Customer();


            customer1.CustomerName     = "Berk";
            customer1.CustomerLastName = "Colak";

            Customer customer2 = new Customer();

            customer2.CustomerName     = "Berk2";
            customer2.CustomerLastName = "Colak2";

            Customer[] customers = new Customer[] { customer1, customer2 };


            customerManager.CustomerAdd(customer1);

            customerManager.CustomerDelete(customer1);

            customerManager.CustomerList(customers);
        }
Beispiel #9
0
        static void Main(string[] args)
        {
            Customer customer1 = new Customer()
            {
                Id = 101101,
                Balance = 500000,
                Name = "Enes",
                Surname = "Yılmaz"
            };

            Customer customer2 = new Customer()
            {
                Id = 101011,
                Balance = 1000000,
                Name = "Haktan",
                Surname = "Çınar"
            };

            CustomerManager customerManager = new CustomerManager();
            customerManager.CustomerAdd(customer1);
            customerManager.CustomerList(customer1);

            Console.ReadLine();
        }
Beispiel #10
0
        static void Main(string[] args)
        {
            // (Türkçe)
            // ClassMetotDemo isimli bir proje oluşturunuz. Bunu Github'a aktarınız. Projeniz şunu yapacak.
            // Bir bankada müşteri takibi yapmak istiyorsunuz. Musteri isimli bir Class oluşturunuz. Müşteriye istediğiniz özellikleri ekleyiniz.(Id, Ad, Soyad..)
            // MusteriManager sınıfı oluşturunuz. Musteri parametresi alarak Musteri ekleme, listeleme,silme gibi metotları simule ediniz.


            // (English)
            // Create a project named ClassMethodDemo. Transfer this to Github. Your project will do this.
            // You want to follow up a customer in a bank. Create a Class named Customer. Add the features you want to the customer.(Id, Name, Surname....)
            // Create the CustomerManager class. Simulate methods such as adding, listing, and deleting customers by taking the customer parameter.

            //Aşağıdaki değerler rastgele verilmiş değerlerdir.


            Customer customer1 = new Customer();

            customer1.Id      = 1;
            customer1.TCNo    = "12345678916";
            customer1.Name    = "Mahsum";
            customer1.Surname = "Yatkı";
            customer1.Age     = 25;
            customer1.TelNo   = "5555555555";
            customer1.Gender  = "E";

            Customer customer2 = new Customer();

            customer2.Id      = 2;
            customer2.TCNo    = "98765432194";
            customer2.Name    = "Kemal";
            customer2.Surname = "Kalkan";
            customer2.Age     = 23;
            customer2.TelNo   = "5554444444";
            customer2.Gender  = "E";

            Customer customer3 = new Customer();

            customer3.Id      = 3;
            customer3.TCNo    = "57864127843";
            customer3.Name    = "Ayşe";
            customer3.Surname = "Gergin";
            customer3.Age     = 22;
            customer3.TelNo   = "5553545667";
            customer3.Gender  = "K";

            Customer[]      customers       = new Customer[] { customer1, customer2, customer3 };
            CustomerManager customerManager = new CustomerManager();

            foreach (var customer in customers)
            {
                customerManager.CustomerAdd(customer);
            }
            Console.WriteLine("");
            foreach (var customer in customers)
            {
                customerManager.CustomerDelete(customer);
            }
            Console.WriteLine("");
            foreach (var customer in customers)
            {
                customerManager.CustomerList(customer);
            }
        }
Beispiel #11
0
        static void Main(string[] args)
        {
            Customer customer1 = new Customer();

            customer1.Id         = 1;
            customer1.Name       = "Yasir";
            customer1.LastName   = "Demirci";
            customer1.CardNumber = 1000001;

            Customer customer2 = new Customer();

            customer2.Id         = 1;
            customer2.Name       = "Malik";
            customer2.LastName   = "Demirci";
            customer2.CardNumber = 1000002;

            Customer customer3 = new Customer();

            customer3.Id         = 1;
            customer3.Name       = "Ahmet Arif";
            customer3.LastName   = "Demirci";
            customer3.CardNumber = 1000003;

            Customer customer4 = new Customer();

            customer4.Id         = 1;
            customer4.Name       = "Yunus Emre";
            customer4.LastName   = "Demirci";
            customer4.CardNumber = 1000004;
            //-------------------------------

            //-------------------------------
            CustomerManager customerManager = new CustomerManager();

            customerManager.CustomerAdd(customer1);
            Console.WriteLine("\n");
            customerManager.ListCustomer(customer1);

            Console.WriteLine("-----------------------------------------------");

            customerManager.CustomerAdd(customer2);
            Console.WriteLine("\n");
            customerManager.ListCustomer(customer2);

            Console.WriteLine("-----------------------------------------------");

            customerManager.CustomerAdd(customer3);
            Console.WriteLine("\n");
            customerManager.ListCustomer(customer3);

            Console.WriteLine("-----------------------------------------------");

            customerManager.CustomerAdd(customer4);
            Console.WriteLine("\n");
            customerManager.ListCustomer(customer4);

            Console.WriteLine("-----------------------------------------------");

            Console.WriteLine("-----------------------------------------------------------------------------------------");

            customerManager.CustomerDelete(customer1);
            Console.WriteLine("\n");
            customerManager.CustomerDelete(customer2);
            Console.WriteLine("\n");
            customerManager.CustomerDelete(customer3);
            Console.WriteLine("\n");
            customerManager.CustomerDelete(customer4);
        }
Beispiel #12
0
        static void Main(string[] args)
        {
            Customer customer1 = new Customer();

            customer1.AccountNumber   = "0001";
            customer1.CustomerName    = "Dilek";
            customer1.CustomerSurname = "Sen";
            customer1.CustomerAddress = "Cekmeköy";
            customer1.CustomerPhone   = "5301112262";

            Customer customer2 = new Customer();

            customer2.AccountNumber   = "0002";
            customer2.CustomerName    = "Guney";
            customer2.CustomerSurname = "Sen";
            customer2.CustomerAddress = "Yenidogan";
            customer2.CustomerPhone   = "5498862462";

            Customer customer3 = new Customer();

            customer3.AccountNumber   = "0003";
            customer3.CustomerName    = "Altug";
            customer3.CustomerSurname = "Atmaca";
            customer3.CustomerAddress = "Pendik";
            customer3.CustomerPhone   = "5070446255";

            Customer[] customers = new Customer[] { customer1, customer2, customer3 };

            CustomerManager cm = new CustomerManager();

            Console.WriteLine("Müşteri sistemine hoşgeldiniz!\n" +
                              "Müşteri eklemek için 1'i,\n" +
                              "Müşteri listesine ulaşmak için 2'yi\n" +
                              "Müşteri silmek için 3'ü tuşlayınız.\n");
            int secim = int.Parse(Console.ReadLine());

            if (secim == 1)
            {
                Customer customerNew = new Customer();
                Console.WriteLine("Müşteri hesap numarasını giriniz: ");
                customerNew.AccountNumber = Console.ReadLine();

                Console.WriteLine("Müşteri adını giriniz: ");
                customerNew.CustomerName = Console.ReadLine();

                Console.WriteLine("Müşteri soyadını giriniz: ");
                customerNew.CustomerSurname = Console.ReadLine();

                Console.WriteLine("Müşteri adresini giriniz: ");
                customerNew.CustomerAddress = Console.ReadLine();

                Console.WriteLine("Müşteri telefon numarasını giriniz: ");
                customerNew.CustomerPhone = Console.ReadLine();

                cm.CustomerAdd(customerNew);
            }
            else if (secim == 2)
            {
                cm.CustomerList(customers);
            }
            else if (secim == 3)
            {
                Console.WriteLine("Silmek istediğiniz müşterinin hesap numarasını giriniz:");
                string delAccountNo = Console.ReadLine();
                cm.CustomerDelete(delAccountNo);
            }
            else
            {
                Console.WriteLine("Hatalı bir seçim yaptınız!");
            }
        }
Beispiel #13
0
        static void Main(string[] args)
        {
            Customer customer1 = new Customer();

            customer1.AccountNumber   = "1";
            customer1.CustomerName    = "Ahmet Enes";
            customer1.CustomerSurname = "Karaca";
            customer1.CustomerAddress = "Atakum";
            customer1.CustomerPhone   = "5529269210";

            Customer customer2 = new Customer();

            customer2.AccountNumber   = "2";
            customer2.CustomerName    = "1. X kişisi";
            customer2.CustomerSurname = "Soyisim";
            customer2.CustomerAddress = "Bafra";
            customer2.CustomerPhone   = "5555555555";

            Customer customer3 = new Customer();

            customer3.AccountNumber   = "3";
            customer3.CustomerName    = "2. X kişisi";
            customer3.CustomerSurname = "Soyisim";
            customer3.CustomerAddress = "Samsun";
            customer3.CustomerPhone   = "5055055050";

            Customer[] customers = new Customer[] { customer1, customer2, customer3 };

            CustomerManager cm = new CustomerManager();

            Console.WriteLine("Müşteri sistemine hoşgeldiniz!\n" +
                              "Müşteri eklemek için 1'i,\n" +
                              "Müşteri listesine ulaşmak için 2'yi\n" +
                              "Müşteri silmek için 3'ü tuşlayınız.\n");
            int secim = int.Parse(Console.ReadLine());

            if (secim == 1)
            {
                Customer customerNew = new Customer();
                Console.WriteLine("Müşteri hesap numarasını giriniz: ");
                customerNew.AccountNumber = Console.ReadLine();

                Console.WriteLine("Müşteri adını giriniz: ");
                customerNew.CustomerName = Console.ReadLine();

                Console.WriteLine("Müşteri soyadını giriniz: ");
                customerNew.CustomerSurname = Console.ReadLine();

                Console.WriteLine("Müşteri adresini giriniz: ");
                customerNew.CustomerAddress = Console.ReadLine();

                Console.WriteLine("Müşteri telefon numarasını giriniz: ");
                customerNew.CustomerPhone = Console.ReadLine();

                cm.CustomerAdd(customerNew);
            }
            else if (secim == 2)
            {
                cm.CustomerList(customers);
            }
            else if (secim == 3)
            {
                Console.WriteLine("Silmek istediğiniz müşterinin hesap numarasını giriniz:");
                string delAccountNo = Console.ReadLine();
                cm.CustomerDelete(delAccountNo);
            }
            else
            {
                Console.WriteLine("Hatalı bir seçim yaptınız!");
            }
        }