Exemplo n.º 1
0
        static void Main(string[] args)
        {
            try
            {
                UserInterface ui = new UserInterface();
                valueMoney = ui.Input(out currency, out convertToCurrency, out usd, out eur, out rub);
                Converter converter = new Converter(usd, eur, rub);
                switch (currency)
                {
                case 1:
                    ui.Output(converter.ConvertUAH(valueMoney, convertToCurrency));
                    break;

                case 2:
                    ui.Output(converter.ConvertEUR(valueMoney, convertToCurrency));
                    break;

                case 3:
                    ui.Output(converter.ConvertUSD(valueMoney, convertToCurrency));
                    break;

                case 4:
                    ui.Output(converter.ConvertRUB(valueMoney, convertToCurrency));
                    break;

                default:
                    break;
                }
            }
            catch (Exception) { }
        }