-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathProgram.cs
38 lines (24 loc) · 1.09 KB
/
Program.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
using System;
namespace RomanNumerals.V2
{
class Program
{
static void Main(string[] args)
{
Console.WriteLine("Please enter a roman numeral or a number: ");
string usersInput = Console.ReadLine().ToUpper();
NumeralConversion numeralConversion = new NumeralConversion();
numeralConversion.EnteredValue = usersInput;
Console.WriteLine($"You entered {usersInput}");
ConvertorFactory convertorFactory = new ConvertorFactory();
// ReadAndWriteToFile readAndWriteToFile = new ReadAndWriteToFile();
IConvertor convertor = convertorFactory.GetConvertor(usersInput);
convertor.ConvertInput(numeralConversion);
DataStore resultWriter = new DataStore();
Console.WriteLine(value: $"Your numeral converted to a number is: {numeralConversion.NewValue}");
Console.WriteLine("\nPrevious entries and conversions: ");
resultWriter.Read(numeralConversion);
resultWriter.Write(numeralConversion);
}
}
}