using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; using gyakorlasdogara0920; namespace gyakorlasdogara0920 { internal class Podcastok : Zenek { public Dictionary Fejezetek { get; set; } public string Leiras { get; set; } private bool feliratkozas; public bool Feliratkozas { get { return feliratkozas; } } public Podcastok(string cim, string eloado, int kiadasEve, int hossz, int minoseg, Dictionary fejezetek, string leiras, bool feliratkozas) : base(cim, eloado, kiadasEve, hossz, minoseg) { Fejezetek = fejezetek; Leiras = leiras; this.feliratkozas = feliratkozas; } public string feliratkoz() { this.feliratkozas = true; return $"A {Cim} podcastre fel lettél iratkozva!"; } public string leiratkoz() { this.feliratkozas = false; return $"A {Cim} podcastről leiratkoztál!"; } public string fejezetKezdopontMeghataroz() { int elozoElem = 0; string fejezetKezdesek = ""; int reszHossz = 0; foreach (var elem in Fejezetek) { fejezetKezdesek += $"{elem.Value}: " + reszHossz + $". perctől; "; reszHossz += elem.Key; } return fejezetKezdesek; } } }