Kayıtlar

Şubat 17, 2023 tarihine ait yayınlar gösteriliyor

C# Abstract Factory Method Design Pattern Örneği

 C# dilinde Abstract Factory Metot Tasarım Deseni için örnek bir kod hazırladım. using System; namespace TekstilFabrikasi { public interface IPantolon { string PantolonEkle(); } public interface IGomlek { string GomlekEkle(); }     public class Pantolon : IPantolon     {         public string PantolonEkle()         {             return "Pantolon";         }     }     public class Gomlek : IGomlek     {         public string GomlekEkle()         {             return "Gömlek";         }     } public interface ICeket { string CeketEkle(); } public class Ceket : ICeket     {         public string CeketEkle()         {             return "Ceket";         }     }     public interface IElbiseFactory{ IPantolon PantolonYap(); IGomlek GomlekYap(); ICeket CeketYap(); string KumasTipi(); string Mevsimi(); }     public class Yazlik : IElbiseFactory     {         public string KumasTipi()         {            return &qu