Esempio n. 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);
            }
        }
Esempio n. 2
0
 private void DisplayTheResult(NumericManager manager, int arabic)
 {
     Writer.WriteLine($"The roman equivalent is equal to: {manager.FromArabicToRoman(arabic)}");
 }
Esempio n. 3
0
 private void DisplayTheResult(NumericManager manager, string roman)
 {
     Writer.WriteLine($"The arabic equivalent is equal to: {manager.FromRomanToArabic(roman)}");
 }