Esempio n. 1
0
        static void Main(string[] args)
        {
            DocumentWorker doc = new DocumentWorker();

            Console.WriteLine("Введите ключ");
            string inputKey = Console.ReadLine();

            if (inputKey == "pro")
            {
                doc = new ProDocumentWorker();
                Print(doc);
            }
            else if (inputKey == "exp")
            {
                doc = new ExpertDocumentWorker();
                Print(doc);
            }
            else
            {
                Print(doc);
            }
            Console.ReadLine();
        }
Esempio n. 2
0
 static public void Print(DocumentWorker doc)
 {
     doc.OpenDocument();
     doc.EditDocument();
     doc.SaveDocument();
 }