Question: Here's the code I have currently but when I test it I get the same date for hiredDate and birthDate The Person Class public class

 Here's the code I have currently but when I test it

I get the same date for hiredDate and birthDate The Person Class

public class Person { private String lastName; private String first Name; private

Date birthDate; public Person (String lastName, String first Name, Date birthDate) !

Here's the code I have currently but when I test it I get the same date for hiredDate and birthDate

The Person Class public class Person { private String lastName; private String first Name; private Date birthDate; public Person (String lastName, String first Name, Date birthDate) ! this.lastName = lastName; this.firstName = firstName; this.birthDate = birthDate; public String getLastName() { return lastName; } public String get FirstName() { return firstName; public Date getBirthDate() { return birthDate; } public void setLastName (String lastName) { this.lastName = lastName; } public void setFirst Name (String firstName) { this.firstName = firstName; } public void setBirthDate (Date birthDate) { this.birthDate = birthDate; } The Date Class public class Date { private int year; private int month; private int day; // 1-12 // 1-31 public Date(int year, int month, int day) { this.year = year; this.month = month; this.day = day; } public Date() { GregorianCalendar today = new GregorianCalendar(); year = today.get (Calendar. YEAR); month = today.get (Calendar.MONTH) + 1; day = today.get (Calendar.DATE); } public String toString() { return year + "-" + make TwoDigits (month) + makeTwoDigits (day); "-" + public boolean equals (Date otherDate) { return ((this.year == other Date.year) && (this.month == otherDate.month) && (this.day == otherDate.day) ); } .; private static String makeTwoDigits (int n) { if (n

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!