static void Main(string[] args) { //Задание 2. Console.ForegroundColor = ConsoleColor.Yellow; Console.Write("Введите ключь: "); string sirealnumber = Console.ReadLine(); DocumentWorker freeprogramm = new DocumentWorker(); ProDocumentWorker proprogramm = new ProDocumentWorker(); ExpertDocumentWorker expertprogramm = new ExpertDocumentWorker(); if (sirealnumber == "pro") { proprogramm.EditDocument(); proprogramm.SaveDocument(); } if (sirealnumber == "exp") { expertprogramm.SaveDocument(); } else { freeprogramm.OpenDocument(); freeprogramm.EditDocument(); freeprogramm.SaveDocument(); } //Задание 3. IPlayable Play = new Player(); IRecodable Record = new Player(); Console.WriteLine(); Play.Play(); Play.Pause(); Play.Stop(); Console.WriteLine(); Record.Record(); Record.Pause(); Record.Stop(); }
static void Main(string[] args) { //Зд 2. Console.Write("Введите ключь: "); string sireal = Console.ReadLine(); DocumentWorker free = new DocumentWorker(); ProDocumentWorker pro = new ProDocumentWorker(); ExpertDocumentWorker expert = new ExpertDocumentWorker(); if (sireal == "pro") { pro.EditDocument(); pro.SaveDocument(); } if (sireal == "exp") { expert.SaveDocument(); } else { free.OpenDocument(); free.EditDocument(); free.SaveDocument(); } //Зд 3. IPlayable Play = new Player(); IRecodable Record = new Player(); Console.WriteLine(); Play.Play(); Play.Pause(); Play.Stop(); Console.WriteLine(); Record.Record(); Record.Pause(); Record.Stop(); }