Exemplo n.º 1
0
        static void Main(string[] args)
        {
            CD Nightwish = new CD();
            Nightwish.AlbumName = "Endless Forms Most Beautiful";
            Nightwish.Artist = "Nightwish";

            Song song1 = new Song();
            song1.Name = "Shudder Before the Beautiful";
            song1.Length = "6:29";

            Song song2 = new Song();
            song2.Name = "Weak Fantasy";
            song2.Length = "5:23";

            Song song3 = new Song();
            song3.Name = "Elan";
            song3.Length = "4:45";

            Song song4 = new Song();
            song4.Name = "Yours Is an Empty Hope";
            song4.Length = "5:34";

            Nightwish.AddSong(song1);
            Nightwish.AddSong(song2);
            Nightwish.AddSong(song3);
            Nightwish.AddSong(song4);
            Nightwish.PrintData();
        }
Exemplo n.º 2
0
Arquivo: CD.cs Projeto: RikLaa/Demo05
 public void AddSong(Song song)
 {
     Songs.Add(song);
 }