Пример #1
0
        static void Main(string[] args)
        {
            ICrediManager ihtiyacCrediManager = new IhtiyacCrediManager();
            ICrediManager tasitCrediManager   = new TasitCrediManager();
            ICrediManager konutCrediManager   = new KonutCrediManager();

            ILoggerService databaseLoggerService = new DatabaseLoggerService();
            ILoggerService fileLoggerService     = new FileLoggerService();

            BasvuruManager basvuruManager = new BasvuruManager();

            basvuruManager.BasvuruYap(new EsnafCreditManager(), new SmsLoggersService());

            List <ICrediManager> credits = new List <ICrediManager> {
                ihtiyacCrediManager, tasitCrediManager, konutCrediManager
            };

            //basvuruManager.KrediOnBilgilendirmesiYap(credits);
        }
Пример #2
0
        static void Main(string[] args)
        {
            //IhtiyacCrediManager ihtiyacCrediManager = new IhtiyacCrediManager();
            //ihtiyacCrediManager.Calculate();

            //KonutCrediManager konutCrediManager = new KonutCrediManager();
            //konutCrediManager.Calculate();

            //TasitCrediManager tasitCrediManager = new TasitCrediManager();
            //tasitCrediManager.Calculate();

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

            ICrediManager ihtiyacCrediManager1 = new IhtiyacCrediManager();
            ICrediManager konutCrediManager1   = new KonutCrediManager();
            ICrediManager tasitCrediManager1   = new TasitCrediManager();
            //demekki interfacelerde kendilerini implement eden sınıfların
            //referanslarını tutabilir tıpkı base classlar gibi..

            ILoggerService databaseLoggerService = new DatabaseLoggerService();
            ILoggerService fileLoggerService     = new FileLoggerService();

            BasvuruManager basvuruManager = new BasvuruManager();

            basvuruManager.BasvuruYap(new EsnafCrediManager(), new List <ILoggerService>()
            {
                new DatabaseLoggerService(), new SmsLoggerService()
            });                                                       //polymorphism
            //ne yazarsak onun metodu
            //çalışır(abstraction)

            List <ICrediManager> krediler = new List <ICrediManager>()
            {
                ihtiyacCrediManager1,
                konutCrediManager1, tasitCrediManager1
            };
            //basvuruManager.CrediOnBilgilendirmesiYap(krediler);
        }
Пример #3
0
        static void Main(string[] args)
        {
            //NecessityCrediManager necessityCrediManager = new NecessityCrediManager();
            //necessityCrediManager.Calculate();

            //VehicleCrediManager vehicleCrediManager = new VehicleCrediManager();
            //vehicleCrediManager.Calculate();

            //KonutCrediManager konutCrediManager = new KonutCrediManager();
            //konutCrediManager.Calculate();

            ICrediManager necessityCrediManager = new NecessityCrediManager();

            ICrediManager vehicleCrediManager = new VehicleCrediManager();

            ICrediManager konutCrediManager = new KonutCrediManager();

            ApplicationManager applicationManager = new ApplicationManager();

            applicationManager.MakeAnApplication(necessityCrediManager);
            applicationManager.MakeAnApplication(vehicleCrediManager);
            applicationManager.MakeAnApplication(konutCrediManager);
        }