Пример #1
0
        public override void Run()
        {
            NumericManager manager = new NumericManager();

            try
            {
                int arabic = EnterArabicNumber();
                manager.ValidateArabicNumber(arabic);

                DisplayTheResult(manager, arabic);

                string roman = EnterRomanNumber();
                manager.ValidateRomanNumber(roman);

                DisplayTheResult(manager, roman);
            }
            catch (Exception e)
            {
                Console.WriteLine(e.Message);
            }
        }
Пример #2
0
 private void DisplayTheResult(NumericManager manager, int arabic)
 {
     Writer.WriteLine($"The roman equivalent is equal to: {manager.FromArabicToRoman(arabic)}");
 }
Пример #3
0
 private void DisplayTheResult(NumericManager manager, string roman)
 {
     Writer.WriteLine($"The arabic equivalent is equal to: {manager.FromRomanToArabic(roman)}");
 }