I am trying to write a date of birth compair. here is how i have started out but I am not getting the results I want to see I am wanting to enter the text as
03/14/73 and compaire that to todays date and tell the user how old they are in only years.
This is as far as I can get with it and I will be totaly truthfull I did not write the hole thing this is the beginging of a class assinment and I cant find were on the net to get help. Sugestions. Please.
System.out.print("Enter the year you were born: ");
usrYear = getYear(year);
userYr = Integer.parseInt(usrYear);
System.out.print("Enter the month you were born: ");
usrMonth = getMonth();
userMth = Integer.parseInt(usrMonth);
System.out.print("Enter the day you were born: ");
usrDay = getDay(userMth);
userDay = Integer.parseInt(usrDay);
System.out.println("Your birthday is on " + userMth + "/" + userDay + "/" + userYr);
displayAge(userYr, year, userMth, month, userDay, day);
}
public static String getYear(int yr)throws Exception {
int outYear=0;
int year;
year = yr;
String usrYear = new String();
String output = new String();
usrYear = getString();
:?: