Ejemplo n.º 1
0
        static void Main(string[] args)
        {
            {
                Gamer gamer = new Gamer {
                    Id = 1, FirstName = "Alaaddin", LastName = "Keykubat", DateOfBirth = "01.01.1205", NationalityId = "12345678901"
                };
                GamerManager gamerManager = new GamerManager(new CheckManager());
                gamerManager.Add(gamer);
                gamerManager.Upgrade(gamer);
                gamerManager.Delete(gamer);

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

                Game game = new Game {
                    GameId = 10, GameName = "The Assassins Creed İnfinity", GamePrice = "25 TL"
                };
                GameSaleManager gameSaleManager = new GameSaleManager(gamer);
                gameSaleManager.Sale(game);

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

                Campaign campaign = new Campaign {
                    CampaignId = 1, CampaignName = "%25 indirim kampanyası", CampaignDiscount = "%25"
                };
                CampaignManager campaignManager = new CampaignManager(game);
                campaignManager.AddCampaign(campaign);
                Console.WriteLine(" ");
                campaignManager.DeleteCampaign(campaign);
                Console.WriteLine(" ");
                campaignManager.UpgradeCampaign(campaign);
            }
        }
Ejemplo n.º 2
0
        static void Main(string[] args)
        {
            Gamer gamer = new Gamer()
            {
                Id = 1, NationalIdentity = "12345678910", FirstName = "Muhammed", LastName = "Bayri", Birthday = "02.01.2000"
            };

            Gamer gamer2 = new Gamer()
            {
                Id = 1, NationalIdentity = "12345", FirstName = "Ahmet", LastName = "Bayri", Birthday = "02.01.2000"
            };


            GamerManager gamerManager = new GamerManager(new VerificationManager());

            gamerManager.SignUp(gamer);
            gamerManager.Delete(gamer);
            gamerManager.Update(gamer);

            Console.WriteLine("*****************************************");

            gamerManager.SignUp(gamer2);

            Console.WriteLine("*****************************************");

            Game game = new Game()
            {
                Id = 1, GameName = "GTA V", Price = 85
            };

            GameManager gameManager = new GameManager();

            gameManager.Add(game);
            gameManager.Delete(game);
            gameManager.Update(game);

            Console.WriteLine("*****************************************");

            Campaign campaign = new Campaign()
            {
                Id = 1, CampaignName = "Ilk satin alim kampanyasi", Discount = 15
            };

            GameSaleManager gameSaleManager = new GameSaleManager(campaign);

            gameSaleManager.Sell(gamer, game);
        }
Ejemplo n.º 3
0
        static void Main(string[] args)
        {
            //Game'lerin oluşturuldu kısım
            Game game1 = new Game
            {
                GameName     = "Last Of Us 2",
                GameCategory = "Hayatta Kalma",
                GamePrice    = 250
            };
            Game game2 = new Game
            {
                GameName     = "Uncharted 4",
                GameCategory = "Macera",
                GamePrice    = 350
            };
            Game game3 = new Game
            {
                GameName     = "God Of War",
                GameCategory = "Aksiyon, Dövüş",
                GamePrice    = 450
            };

            //Kampanyaların Oluşturulduğ Kısım
            Campaigns campaign1 = new Campaigns();

            campaign1.CampaignName     = "Yaz İndirimi";
            campaign1.CampaignDiscount = 50;

            Campaigns campaign2 = new Campaigns();

            campaign2.CampaignName     = "Haftasonu İndirimi";
            campaign2.CampaignDiscount = 25;


            //Gamer'ların oluşturuluğu kısım
            Gamer gamer1 = new Gamer
            {
                FirstName     = "Engin ",
                LastName      = "Demiroğ",
                NationalityId = "12345678910",
                DateOfBirth   = new DateTime(1985, 1, 6)
            };
            Gamer gamer2 = new Gamer
            {
                FirstName     = "Zeynel ",
                LastName      = "Toplar",
                NationalityId = "10987654321",
                DateOfBirth   = new DateTime(1998, 10, 20)
            };

            //Gamer'ların yönetildiği kısım (Add, Update, Delete)
            GamerManager gamerManager = new GamerManager(new VerificationManager());

            gamerManager.Add(gamer1);
            gamerManager.Add(gamer2);
            gamerManager.Update(gamer1);

            Console.WriteLine("************************");

            //Game'lerin yönetildiği kısım
            GameManager gameManager = new GameManager();

            gameManager.Add(game1);

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


            gameManager.Add(game2);

            Console.WriteLine("************************");

            //Kampanyaların yönetildiği kısım
            CampaignManager campaignManager = new CampaignManager();

            campaignManager.Add(campaign1);
            campaignManager.Add(campaign2);

            Console.WriteLine("************************");

            //Oyun satışlarının yönetildiği kısım.
            GameSaleManager gameSaleManager = new GameSaleManager();

            gameSaleManager.Sale(gamer1, game1, campaign1);

            Console.WriteLine("************************");

            gameSaleManager.Sale(gamer2, game3, campaign2);



            Console.ReadLine();
        }