MusicPlayer done

This commit is contained in:
szabomarton
2023-12-15 09:19:46 +01:00
parent ba45a77131
commit 1083d18459
33 changed files with 424 additions and 0 deletions

View File

@@ -0,0 +1,56 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Zenelejatszo
{
class Dal
{
public string cim, eloado;
public string Cim
{
get { return this.cim; }
set { this.cim = value; }
}
public string Eloado
{
get { return this.eloado; }
set { this.eloado = value; }
}
public Dal(string cim, string eloado)
{
Cim = cim;
Eloado = eloado;
}
}
class MusicPlayer
{
public List<Dal> l = new List<Dal>();
public void Lejatszas()
{
foreach (Dal d in l)
{
Console.WriteLine($"A szám előadója: {d.Eloado}");
Console.WriteLine($"A szám címe: {d.Cim}");
}
}
}
class Program
{
static void Main(string[] args)
{
MusicPlayer mp = new MusicPlayer();
Dal song = new Dal("Mindig és soha", "Mikee Mykanic");
Dal song1 = new Dal("Szellemjárás", "Killakikitt");
mp.l.Add(song);
mp.l.Add(song1);
mp.Lejatszas();
}
}
}