Esempio n. 1
0
        public CDType BuildSamsungCDType()
        {
            CDType cds = new CDType();

            cds.AddItem(new Samsung());
            return(cds);
        }
Esempio n. 2
0
        public CDType BuildSonyCDType()
        {
            CDType cds = new CDType();

            cds.AddItem(new Sony());
            return(cds);
        }
Esempio n. 3
0
        static void Main(string[] args)
        {
            CDBuilder cDBuilder = new CDBuilder();
            CDType    cdType    = cDBuilder.BuildSonyCDType();

            cdType.ShowItems();

            CDType cdType2 = cDBuilder.BuildSamsungCDType();

            cdType2.ShowItems();

            Console.ReadLine();
        }