Hi,

I have a predefined Day.class that formats the date [yyyy,mm,dd]. I need to ask for date of birth, but just can't figure it out - bit of a newbie sorry! Code below from patient class, sets the date of birth at today's date, which is obviously incorrect but like to show I'm trying! All the patient info is requested from the user called by method in another class.

Code:
import corejava.Day;

public class Patient
{
  private String patientName;
  private String patientAddress;
  private Day dateOfBirth;
  private int patientNumber;
  private static int nextPatientNumber = 1000;  //sets first patient number as 1000

  public Patient (String n, String a)
  {
    patientName = n;
    patientAddress = a;
    dateOfBirth = new Day();  //doesn't work need to ask for DOB
    patientNumber = nextPatientNumber;  //sets patient number
    nextPatientNumber++;  //moves to next patient number
  }

  public String getPatientName()
  {
    return patientName;
  }

  public void setPatientAddress(String a)
  {
    patientAddress = a;
  }

  public void printDetails()
  {
    System.out.println("\nDetails for patient " + patientName);
    System.out.println("\nPatient address: " + patientAddress);
    System.out.println("\tPatient number: " + patientNumber);
    System.out.println("\tDate of birth: " + dateOfBirth.toString());
  }
All suggestions gratefully received.