BicepBuddyApp/src/main/java/User/UserDB.java
public User testerGetRandomUser() {
		Random r = new Random();
		int userToGet = r.nextInt(getNumUsers() + 1);
		
		try {
			reader = new BufferedReader(new FileReader(new File(filename)));
			String line;
			Master.appLogger.info(":: Opening CSV DB file to find random user.");
			int curUser = 0;
			while ((line = reader.readLine()) != null) {
				String[] split = line.split(",");
				
				//if this user in the db is the one that
				//random selection gave us, return it.
				if(curUser == userToGet) {
					return new User(split);
				}
				curUser++;
			}
			
			reader.close();
			
		} catch (Exception e) {
			e.printStackTrace();
		}
		
		return null;
	}
/**
	 * Tester get random user.
	 *
	 * @return a random user
	 */
Tester get random user.
@return a random user
Tester get random user . @return a random user
public User testerGetRandomUser() {
		Random r = new Random();
		int userToGet = r.nextInt(getNumUsers() + 1);
		try {
			reader = new BufferedReader(new FileReader(new File(filename)));
			String line;
			Master.appLogger.info(":: Opening CSV DB file to find random user.");
			int curUser = 0;
			while ((line = reader.readLine()) != null) {
				String[] split = line.split(",");
				if(curUser == userToGet) {
					return new User(split);
				}
				curUser++;
			}
			reader.close();
		} catch (Exception e) {
			e.printStackTrace();
		}
		return null;
	}
public User testerGetRandomUser ( ) { Random r = new Random ( ) ; int userToGet = r . nextInt ( getNumUsers ( ) + 1 ) ; try { reader = new BufferedReader ( new FileReader ( new File ( filename ) ) ) ; String line ; Master . appLogger . info ( ":: Opening CSV DB file to find random user." ) ; int curUser = 0 ; while ( ( line = reader . readLine ( ) ) != null ) { String [ ] split = line . split ( "," ) ; if ( curUser == userToGet ) { return new User ( split ) ; } curUser ++ ; } reader . close ( ) ; } catch ( Exception e ) { e . printStackTrace ( ) ; } return null ; }
Tester get random user.
Tester get random user .
//if this user in the db is the one that //random selection gave us, return it.