internal static void Main() { Console.WriteLine(CalculationHelpers.CalculateTriangleArea(3, 4, 5)); Console.WriteLine(CalculationHelpers.DigitToWord(5)); Console.WriteLine(CalculationHelpers.FindMaximumValue(5, -1, 3, 2, 14, 2, 3)); ConsoleWriter.PrintToConsoleAsNumberInFormat(1.3, "f"); ConsoleWriter.PrintToConsoleAsNumberInFormat(0.75, "%"); ConsoleWriter.PrintToConsoleAsNumberInFormat(2.30, "r"); bool horizontal; bool vertical; Console.WriteLine(CalculationHelpers.CalculateDistance(3, -1, 3, 2.5, out horizontal, out vertical)); Console.WriteLine("Horizontal? " + horizontal); Console.WriteLine("Vertical? " + vertical); var peterOtherInfo = new PersonalInfo.PersonalInformation("From Sofia, born on 17.03.1992"); Student peter = new Student("Peter", "Ivanov", peterOtherInfo); var stellaOtherInfo = new PersonalInfo.PersonalInformation("From Vidin, gamer, high results, born on 03.11.1993"); Student stella = new Student("Stella", "Markova", stellaOtherInfo); Console.WriteLine("{0} older than {1} -> {2}", peter.FirstName, stella.FirstName, peter.IsOlderThan(stella)); }
public static void Main() { Console.WriteLine(CalculationHelpers.CalculateTriangleArea(3, 4, 5)); Console.WriteLine(CalculationHelpers.DigitToText(5)); Console.WriteLine(CalculationHelpers.FindMaximumValue(5, -1, 3, 2, 14, 2, 3)); CalculationHelpers.FormatNumber(1.3, FormatOption.FloatingPoint); CalculationHelpers.FormatNumber(0.25, FormatOption.Percent); CalculationHelpers.FormatNumber(2.30, FormatOption.AlignRight); bool horizontal; bool vertical; Console.WriteLine(CalculationHelpers.CalculateDistance(3, -1, 3, 2.5, out horizontal, out vertical)); Console.WriteLine(CalculationHelpers.CheckAlignmentOfLine(3, -1, 3, 2.5)); Student studentOne = new Student() { FirstName = "Peter", LastName = "Ivanov", DateOfBirth = new DateTime(1980, 05, 01), Town = Town.Burgas, AdditionalInfo = "N/A" }; Student studentTwo = new Student() { FirstName = "Stella", LastName = "Markova", DateOfBirth = new DateTime(1993, 11, 03), Town = Town.Plovdiv, AdditionalInfo = "N/A" }; Console.WriteLine( "{0} older than {1} -> {2}", studentOne.FirstName, studentTwo.FirstName, studentOne.IsOlderThan(studentTwo)); }