Ejemplo n.º 1
0
        public bool IsOlderThan(IStudent other)
        {
            try
            {
                DateTime firstStudentBirthday = this.GetBirthday(this.AdditionalInfo);
                DateTime secondStudentBirthday = other.GetBirthday(other.AdditionalInfo);

                return firstStudentBirthday < secondStudentBirthday;
            }
            catch (Exception e)
            {
                Console.WriteLine(e.Message);
                throw new ArgumentException("One or both students do not have valid date of birth information provided.");
            }
        }