I just changed this in main:
oldestStudent.updateOldestBirthdate(student, oldestStudent);
I just changed this in main:
oldestStudent.updateOldestBirthdate(student, oldestStudent);
You must review ths checkOldestBirthdate function because it retutned true if the stu.birthdateYear<oldestStu.birthdateYear
and the updateOldestBirthdate is called in consequance. I'm not sure if is that semantec is correct.
um but isn't that how its suppose to be because like for example:
IF 1990 (stu.birthdateYear) < 1999 (oldestStu.birthhdateYear)
oldestStudentbirthdate = true [meaning update]
this means if the student birth date year is less than the oldest students birth date year then the current student is older b/c they were born in an earlier year therefore the oldest studen object should be updated with the current student's birth date, right?
Profile student = new Profile();
Profile base = new Profile("02", "29");
Profile oldestStudent = new Profile("1999", "12", "31");
according to these , you have have 3 constructor in ur Profile class
public Profile(){...}
public Profile(String month, String day){...}
public Profile(String year, String month, String day){...}
i wonder if you want the dates in String or int =.="
just found out sum1 is helping u already.. good luk with ur class~~
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.