static void Main(string[] args) { Console.WriteLine("Achar sozu daxil edin: "); string key = Console.ReadLine(); DocumentProgram docProgram; switch (key) { case "basic": docProgram = new DocumentProgram(); break; case "pro": docProgram = new ProDocumentProgram(); break; case "expert ": docProgram = new ExpertDocument(); break; default: return; } ShowMethods(docProgram); }
static void ShowMethods(DocumentProgram docProgram) { docProgram.OpenDocument(); docProgram.EditDocument(); docProgram.SaveDocument(); }