static void Main(string[] args) { Gamer gamer1 = new Gamer() { FirstName = "Sinem", LastName = "Algül", BirthYear = 2000, IdentityNumber = 12345678901, UserName = "******", CreditCardNumber = 1111111 }; Gamer gamer2 = new Gamer() { FirstName = "Şimal", LastName = "Baykal", BirthYear = 2000, IdentityNumber = 12345678900, UserName = "******", CreditCardNumber = 1111110 }; Gamer gamer3 = new Gamer() { FirstName = "Serenay", LastName = "Ungör", BirthYear = 2000, IdentityNumber = 12345678911, UserName = "******", CreditCardNumber = 1111100 }; Game game1 = new Game() { Id = 1, Name = "Crusader Kings 3", Price = 70 }; Game game2 = new Game() { Id = 2, Name = "FIFA21", Price = 200 }; Game game3 = new Game() { Id = 3, Name = "Hearts of Iron 4", Price = 50 }; Campaign campaign1 = new Campaign() { Id = 100, CampaignName = "WINTER SALE", Discount = 25 }; Campaign campaign2 = new Campaign() { Id = 200, CampaignName = "SUMMER SALE", Discount = 50 }; CampaignManager campaignManager = new CampaignManager(); campaignManager.CampaignDelete(campaign1); campaignManager.CampaignUpdate(campaign2); GamerManager gamerManager = new GamerManager(new MernisServiceAdapter()); gamerManager.Add(gamer1); gamerManager.Delete(gamer2); gamerManager.Update(gamer3); SalesManager salesManager = new SalesManager(); salesManager.Buy(game1, gamer2); salesManager.Buy(game2, gamer1); salesManager.Buy(game3, gamer3); }
public static void Main(string[] args) { BaseGamerManager gamerManager = new GamerManager(new MernisServiceAdapter()); Gamer gamer = new Gamer() { GamerId = 1, NationalityId = "52753464950", FirstName = "Merve", LastName = "ALKAN", DateOfBirth = new System.DateTime(1998, 6, 7) }; gamerManager.Add(gamer); gamerManager.Remove(gamer); gamerManager.Update(gamer); Game game = new Game() { GameId = 2, GameName = "Dota 2", GameDescription = "A Modern Multiplayer Masterwork", GamePrice = 150 }; GameManager gameManager = new GameManager(); gameManager.Add(game); gameManager.Update(game); gameManager.Delete(game); Campaign campaign = new Campaign() { CampaignId = 3, CampaignDiscount = 20, CampaignName = "Dota 2 Discount" }; CampaignManager campaignManager = new CampaignManager(); campaignManager.Add(campaign); campaignManager.Update(campaign); campaignManager.Delete(campaign); SalesManager salesManager = new SalesManager(); salesManager.Sell(gamer, game); salesManager.CampaignSale(gamer, game, campaign); Console.ReadLine(); }
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); }
static void Main(string[] args) { GameManager gameManager = new GameManager(); GamerManager gamerManager = new GamerManager(new UserValidationManager()); gamerManager.Add(new Gamer { Id = 1, FirstName = "Enes", LastName = "ÖZTEPE", DateOfBirth = new DateTime(2000, 1, 1), NationalityId = "12345678910" } ); gamerManager.Add(new Gamer { Id = 2, FirstName = "Ali", LastName = "VELİ", DateOfBirth = new DateTime(1995, 5, 5), NationalityId = "11111111111" } ); gamerManager.Update(new Gamer { Id = 2, FirstName = "ENGİN", LastName = "DEMİROĞ", DateOfBirth = new DateTime(1995, 5, 5), NationalityId = "11111111111" }); gamerManager.Delete(new Gamer { Id = 2, FirstName = "ENGİN", LastName = "DEMİROĞ", DateOfBirth = new DateTime(1995, 5, 5), NationalityId = "11111111111" }); gameManager.GameBuying(new Gamer { Id = 1, FirstName = "ENGİN", LastName = "DEMİROĞ", DateOfBirth = new DateTime(1995, 5, 5), NationalityId = "11111111111" }, new Game { Id = 1, Name = "Resident evil", Price = 100 }, new Campaign { Id = 1, Name = "Cadılar Bayramı", Description = "Korku oyunları indirimi %50", RateOfDiscount = 0.5 }); Console.ReadKey(); }
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(); }
static void Main(string[] args) { Gamer gamer1 = new Gamer() { Id = 1, NationalityId = "12345678910", FirstName = "Kadir Uğur", LastName = "Mert", DateOfBirth = new DateTime(1990, 10, 07) }; Gamer gamer2 = new Gamer() { Id = 2, NationalityId = "12345678910", FirstName = "Uğur", LastName = "Mert", DateOfBirth = new DateTime(1990, 10, 07) }; GamerManager gamerManager = new GamerManager(new GamerCheckManager()); gamerManager.Add(gamer1); gamerManager.Add(gamer2); gamerManager.Update(gamer1); gamerManager.Delete(gamer1); Game game1 = new Game() { Id = 1, GameName = "Cyberpunk 2077", GamePrice = 249 }; Game game2 = new Game() { Id = 2, GameName = "Microsoft Flight Simulator", GamePrice = 349 }; GameManager gameManager = new GameManager(); gameManager.Add(game1); gameManager.Add(game2); gameManager.Update(game1); gameManager.Delete(game2); Campaign campaign = new Campaign { Id = 1, CampaignName = "New Year", CampaignStartDate = new DateTime(2021, 01, 01), CampaignDuration = 30, Discount = 21, }; CampaignManager campaignManager = new CampaignManager(); campaignManager.Add(campaign); campaignManager.Update(campaign); campaignManager.Delete(campaign); SaleManager saleManager = new SaleManager(); saleManager.Sale(gamer1, game1); saleManager.Sale(gamer1, game2, campaign); }