public static void Main() { Console.WriteLine(Methods.CalcTriangleArea(3, 4, 5)); Console.WriteLine(Methods.NumberToDigit(5)); Console.WriteLine(Methods.FindMax(5, -1, 3, 2, 14, 2, 3)); Methods.PrintFormatWithPrecision(1.3); Methods.PrintNumberAsPersentige(0.75); Methods.PrintnumberAlignedRight(2.30); Console.WriteLine(Methods.CalculateDistance(3, -1, 3, 2.5)); Console.WriteLine("Horizontal? " + Methods.IsLineHorizontal(-1, 2.5)); Console.WriteLine("Vertical? " + Methods.IsLineVertical(3, 3)); Student peter = new Student("Peter", "Ivanov" ); peter.OtherInfo = "From Sofia, born at 17.03.1992"; Student stella = new Student("Stella", "Markova"); stella.OtherInfo = "From Vidin, gamer, high results, born at 03.11.1993"; Console.WriteLine( "{0} older than {1} -> {2}", peter.FirstName, stella.FirstName, peter.IsOlderThan(stella)); Console.ReadLine(); }
public static void Main() { Console.WriteLine(MathUtilities.CalculateTriangleArea(3, 4, 5)); Console.WriteLine(MathUtilities.NumberToDigit(5)); Console.WriteLine(MathUtilities.FindMax(5, -1, 3, 2, 14, 2, 3)); MathUtilities.PrintAsNumber(1.3M, "f"); MathUtilities.PrintAsNumber(0.75M, "%"); MathUtilities.PrintAsNumber(2.30M, "r"); Console.WriteLine(MathUtilities.CalculateDistance(3, -1, 3, 2.5)); Console.WriteLine("Horizontal? " + MathUtilities.IsHorizontal(-1, 2.5)); Console.WriteLine("Vertical? " + MathUtilities.IsVertical(3, 3)); Student peter = new Student("Peter", "Ivanov", new DateTime(1992, 3, 17)); Student stella = new Student("Stella", "Markova", new DateTime(1993, 11, 3)); Console.WriteLine("{0} older than {1} -> {2}", peter.FirstName, stella.FirstName, peter.IsOlderThan(stella)); }
public static void Main() { Console.WriteLine(Methods.CalculateTriangleArea(3, 4, 5)); Console.WriteLine(Methods.DigitToString(5)); Console.WriteLine(Methods.FindMaximalElement(5, -1, 3, 2, 14, 2, 3)); Methods.NumberWithPrecisionTwoDigitsAfterTheDecimalPoint(1.3); Methods.NumberAsPercentage(0.75); Methods.NumberEightSignsRightAligned(2.30); Console.WriteLine(Methods.CalculateDistance(3, -1, 3, 2.5)); Console.WriteLine("Is the line horizontal? " + Methods.IsLineHorizontal(3, -1)); Console.WriteLine("Is the line vertical? " + Methods.IsLineVertical(3, 2.5)); Student peter = new Student("Peter", "Ivanov", new DateTime(1992, 3, 17), "From Sofia"); Student stella = new Student("Stella", "Markova", new DateTime(1993, 11, 3), "From Vidin, gamer, high results"); Console.WriteLine("{0} older than {1} -> {2}", peter.FirstName, stella.FirstName, peter.IsOlderThan(stella)); }
private static void Main() { Console.WriteLine(CalcTriangleArea(3, 4, 5)); Console.WriteLine(NumberToDigit(5)); Console.WriteLine(FindMax(5, -1, 3, 2, 14, 2, 3)); PrintAsNumber(1.3, "f"); PrintAsNumber(0.75, "%"); PrintAsNumber(2.30, "r"); Point firstPoint = new Point(3, -1); Point secondPoint = new Point(3, 2.5); Console.WriteLine(CalcDistance(firstPoint, secondPoint)); Console.WriteLine("Horizontal? " + IsHorizontal(firstPoint, secondPoint)); Console.WriteLine("Vertical? " + IsVertical(firstPoint, secondPoint)); Student peter = new Student() { FirstName = "Peter", LastName = "Ivanov" }; peter.OtherInfo = "From Sofia"; peter.BornDate = new DateTime(1992, 3, 17); Student stella = new Student() { FirstName = "Stella", LastName = "Markova" }; stella.OtherInfo = "From Vidin, gamer, high results"; stella.BornDate = new DateTime(1993, 11, 3); Console.WriteLine("{0} older than {1} -> {2}", peter.FirstName, stella.FirstName, peter.IsOlderThan(stella)); }
public static void Main(string[] args) { // Test IsOlderThan method Student peter = new Student("Peter", "Ivanov", new OtherInformation(new DateTime(1992, 3, 17), "Sofia")); Student stella = new Student("Stella", "Markova", new OtherInformation(new DateTime(1993, 11, 3), "Vidin")); Console.WriteLine("{0} older than {1} -> {2}", peter.FirstName, stella.FirstName, peter.IsOlderThan(stella)); // Test MathAssistant Class double triangleArea = MathAssistant.CalculateTriangleArea(3, 4, 5); double calculateDistance = MathAssistant.CalcDistance(3, -1, 3, 2.5); int findMaxValue = MathAssistant.FindMaxValue(5, -1, 3, 2, 14, 2, 3); bool isHorizontal = MathAssistant.IsLineHorizontal(3, -1, 3, 2.5); bool isVertical = MathAssistant.IsLineVertical(3, -1, 3, 2.5); Console.WriteLine(isHorizontal); Console.WriteLine(isVertical); // Test DigitConverter Class string numberAsDigit = DigitConverter.DigitToWord(5); Console.WriteLine(numberAsDigit); // Test ConsoleLogger Class ConsoleLogger.PrintAsNumber(triangleArea, "f"); ConsoleLogger.PrintAsNumber(calculateDistance, "%"); ConsoleLogger.PrintAsNumber(findMaxValue, "r"); }
public static void Main() { Console.WriteLine(GeometryUtilities.CalcTriangleArea(3, 4, 5)); Console.WriteLine(ArithmeticUtilities.NumberToDigit(5)); Console.WriteLine(ArithmeticUtilities.FindMax(5, -1, 3, 2, 14, 2, 3)); PrintUtilities.PrintNumber(1.3, 1); PrintUtilities.PrintPercent(0.75, 0); PrintUtilities.PrintAlignedNumber(2.30, 8); Console.WriteLine(GeometryUtilities.CalcDistance(3, -1, 3, 2.5)); Console.WriteLine("Horizontal? " + GeometryUtilities.IsHorizontalLine(3, -1, 3, 2.5)); Console.WriteLine("Vertical? " + GeometryUtilities.IsVerticallLine(3, -1, 3, 2.5)); Student peter = new Student("Peter", "Ivanov", "Sofia", new DateTime(1992, 3, 17)); Student stella = new Student("Stella", "Markova", "Vidin", new DateTime(1993, 11, 3)); Console.WriteLine("{0} older than {1} -> {2}", peter.FirstName, stella.FirstName, peter.IsOlderThan(stella)); }
public static void Main() { Console.WriteLine("Triangle area:{0}", Calculations.CalcTriangleArea(3, 4, 5)); Console.WriteLine("Digit to string:{0}", FormatNumbers.DigitToDigitWord(5)); Console.WriteLine("Max value from senquence:{0}", Calculations.FindMax(5, -1, 3, 2, 14, 2, 3)); FormatNumbers.PrintNumberWithFloatPointTwoDigitsPrecision(1.3); FormatNumbers.PrintNumberLikePercentage(0.75); FormatNumbers.PrintNumberWithEightSpacesRighAlign(2.30); Console.WriteLine("Distance between points:{0}", Calculations.CalcDistance(3, -1, 3, 2.5)); Console.WriteLine("Horizontal? " + Calculations.IsHorizontalLinear(3, 3)); Console.WriteLine("Vertical? " + Calculations.IsVerticalLinear(-1, 2.5)); Student peter = new Student() { FirstName = "Peter", LastName = "Ivanov", City = "Sofia", BornDate = "01.02.2002" }; Student stella = new Student() { FirstName = "Stella", LastName = "Markova", City = "Plovdiv", BornDate = "15.02.2002" }; Console.WriteLine("{0} older than {1} -> {2}", peter.FirstName, stella.FirstName, peter.IsOlderThan(stella.BornDate)); }