Exemplo n.º 1
0
        static void Main(string[] args)
        {
            MobileDisk md  = new MobileDisk();
            UDisk      ud  = new UDisk();
            Mp3        mp3 = new Mp3();
            Telephone  tel = new Telephone();

            Computer c = new Computer();

            c.MS = tel; //mp3;
            c.MS.Read();
            c.MS.Write();
        }
Exemplo n.º 2
0
        static void Main(string[] args)
        {
            Udisk      u   = new Udisk();
            Mp3        mp3 = new Mp3();
            MobileDisk md  = new MobileDisk();
            Telphone   t   = new Telphone();
            Computer   cpu = new Computer();

            cpu.MS = t; //u;//mp3;//将MP3插到了电脑上

            cpu.CpuRead();
            cpu.CpuWrite();
            // mp3.PlayMusic();
            Console.ReadKey();
        }