Design an algorithm to manage birthday reminders for your family tree. You are given a genealogical tree representing your direct ancestors,
rooted at you. Each person in the tree has a name and birthday. Your task is to implement a function alarmNextBirthday() that sets an alarm
for the next upcoming birthday in the family tree. After that birthday passes, alarmNextBirthday() should be called again to set an alarm for
the subsequent upcoming birthday, and so on. Given:
class Person {
String name;
int birthdayMonth;
int birthdayDayOfTheMonth;
Person parentA;
Person parentB;
public Person(String name, int birthdayMonth, int birthdayDayOfTheMonth, Person parentA, Person parentB) {
this.name = name;
this.birthdayMonth = birthdayMonth;
this.birthdayDayOfTheMonth = birthdayDayOfTheMonth;
this.parentA = parentA;
this.parentB = parentB;
}}
Comments (3)

