// Method will initialize the object froma file's values private void initializeFromFile(String email) throws IOException { // Declare and initialize temporary variables String path = "Profiles\\" + email + "\\" + email + "\\Personal.txt"; BufferedReader read = new BufferedReader(new FileReader(path)); // Read in the values first = read.readLine(); last = read.readLine(); gender = Gender.valueOf(read.readLine()); String[] birthday = read.readLine().split("/"); birthDate = new Date( Integer.parseInt(birthday[0]), Integer.parseInt(birthday[1]), Integer.parseInt(birthday[2])); address = read.readLine(); phoneNumber = read.readLine(); province = read.readLine(); city = read.readLine(); postal = read.readLine(); sin = read.readLine(); read.close(); } // End of initialize from file method
public boolean isMale() { return gender.equals(Gender.Male); }
public boolean isFemale() { return gender.equals(Gender.Female); }