Ejemplo n.º 1
0
 public bool IsOlderThan(Student other)
 {
     return this.BirthDate < other.BirthDate;
 }
        public static void Main()
        {
            Console.WriteLine(CalculateTriangleArea(3, 4, 5));

            Console.WriteLine(ConvertDigitToString(5));

            Console.WriteLine(FindBigestElementIndex(5, -1, 3, 2, 14, 2, 3));

            PrintFormattedNumber(1.3, "f");
            PrintFormattedNumber(0.75, "%");
            PrintFormattedNumber(2.30, "r");

            bool horizontal, vertical;
            double distance = CalculateDistanceAndDirection(3, -1, 3, 2.5, out horizontal, out vertical);
            Console.WriteLine(distance);
            Console.WriteLine("Horizontal? " + horizontal);
            Console.WriteLine("Vertical? " + vertical);

            Student peter = new Student("Peter", "Ivanov", new DateTime(1992, 3, 17), "Sofia");
            Student stella = new Student("Stella", "Markova", new DateTime(1993, 3, 11), "Vidin", "gamer, high results");
            Console.WriteLine("{0} older than {1} -> {2}", peter.FirstName, stella.FirstName, peter.IsOlderThan(stella));
        }