src/com/mmpp/motivationapp/backend/Achiever.java
public void loadMyAchievements(File f) {
		try {
			BufferedReader in = new BufferedReader(new FileReader(f));
			if(!in.ready()) {
				in.close();
				return;
			}
			
			//The first int in the file represents the lifetime completed tasks, 
			//we need to get this value first
			lifetimeCompleted = in.read();
			
			//Now that we have lifetime completed, we can load all of our achievements
			while(in.ready()) {
				String s = in.readLine();
				addAchievement(s, getMyAchievements());
			}
			
			in.close();
		}
		catch(FileNotFoundException e) {
			System.err.println("Could not find the file with the specified filename");
			e.printStackTrace();
		}
		catch(IOException e) {
			System.err.println("I/O error");
			e.printStackTrace();
		}
	}
/**
	 * Loads achievements from a data file into the achiever's list of my achievements
	 * @param f
	 */
Loads achievements from a data file into the achiever's list of my achievements
@param f
Loads achievements from a data file into the achiever ' s list of my achievements @param f
public void loadMyAchievements(File f) {
		try {
			BufferedReader in = new BufferedReader(new FileReader(f));
			if(!in.ready()) {
				in.close();
				return;
			}
			lifetimeCompleted = in.read();
			while(in.ready()) {
				String s = in.readLine();
				addAchievement(s, getMyAchievements());
			}
			in.close();
		}
		catch(FileNotFoundException e) {
			System.err.println("Could not find the file with the specified filename");
			e.printStackTrace();
		}
		catch(IOException e) {
			System.err.println("I/O error");
			e.printStackTrace();
		}
	}
public void loadMyAchievements ( File f ) { try { BufferedReader in = new BufferedReader ( new FileReader ( f ) ) ; if ( ! in . ready ( ) ) { in . close ( ) ; return ; } lifetimeCompleted = in . read ( ) ; while ( in . ready ( ) ) { String s = in . readLine ( ) ; addAchievement ( s , getMyAchievements ( ) ) ; } in . close ( ) ; } catch ( FileNotFoundException e ) { System . err . println ( "Could not find the file with the specified filename" ) ; e . printStackTrace ( ) ; } catch ( IOException e ) { System . err . println ( "I/O error" ) ; e . printStackTrace ( ) ; } }
Loads achievements from a data file into the achiever's list of my achievements
 @param f
Loads achievements from a data file into the achiever ' s list of my achievements @param f
//The first int in the file represents the lifetime completed tasks,  //we need to get this value first //Now that we have lifetime completed, we can load all of our achievements