Beispiel #1
0
        public CDType BuildSamsungCDType()
        {
            CDType cds = new CDType();

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

            cds.AddItem(new Sony());
            return(cds);
        }
Beispiel #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();
        }