public synchronized void FileReader(){
		String filePath = "C:/JavaFiles/QuizManager/QuizMasterFile.csv";
		String playerFilePath="C:/JavaFiles/QuizManager/Players.csv";
		String resultFilePath = "C:/JavaFiles/QuizManager/Results.csv";
		
		File file = new File(filePath);
		File playerFile = new File(playerFilePath);
		File resultFile = new File(resultFilePath);
		
		BufferedReader bufferedReader = null;
		BufferedReader playerReader = null;
		BufferedReader resultReader = null;
		
		String searchChar = ",";
		int quizId=0;
		String title="";
		
		int recordCount =0;
		int totalQuestions=0;
		
		String[] extractedRecord=null;
		Set<Question> questionList =null;
		try{
			bufferedReader = new BufferedReader(new FileReader(file));
			playerReader = new BufferedReader(new FileReader(playerFile));
			resultReader = new BufferedReader(new FileReader(resultFile));
		
			String recordInFile;
			questionList = new HashSet<Question>();
			playerList = new ArrayList<Player>();
			quizList = new HashSet<Quiz>();
			resultList = new ArrayList<Result>();
			//reading the quiz master file
			while ((recordInFile=bufferedReader.readLine()) != null){
				extractedRecord = recordInFile.split(searchChar);
				
				if(extractedRecord.length==3){
					quizId=Integer.parseInt(extractedRecord[0]);
					title = extractedRecord[1];
					totalQuestions = Integer.parseInt(extractedRecord[2]);
					
				}
				else{
					if(recordCount <= totalQuestions){
						recordCount=recordCount+1;
						//System.out.println("~~" +recordCount + " " + totalQuestions );
						questionList.add(new QuestionImpl(Integer.parseInt(extractedRecord[0]),extractedRecord[1],extractedRecord[2],extractedRecord[3],extractedRecord[4],extractedRecord[5],Integer.parseInt(extractedRecord[6]),Integer.parseInt(extractedRecord[7])));	
					}
				}
				
				if(recordCount==totalQuestions){
					quizList.add(new QuizImpl(questionList,title, quizId));
					recordCount=0;
					questionList = new HashSet<Question>();
				}
			}	
			
			extractedRecord=null;
			recordInFile=null;
			//get players data and store them in an ArrayList
			while ((recordInFile=playerReader.readLine()) != null){
				extractedRecord = recordInFile.split(searchChar);
			
				int playerId =Integer.parseInt(extractedRecord[0]);
				String playerName  = extractedRecord[1];
				String userName = extractedRecord[2];
				String password = extractedRecord[3];
					
					playerList.add(new PlayerImpl(playerId,playerName,userName,password));
			}
			
			extractedRecord=null;
			recordInFile=null;
			//get results data and store them in an ArrayList
			while ((recordInFile=resultReader.readLine()) != null){
				extractedRecord = recordInFile.split(searchChar);
			
				int playerId =Integer.parseInt(extractedRecord[0]);
				String playerName=extractedRecord[1];
				int quizId1  = Integer.parseInt(extractedRecord[2]);
				String quizName=extractedRecord[3];
				int score=Integer.parseInt(extractedRecord[4]);
					
				resultList.add(new ResultImpl(score,playerId,quizId1,quizName,playerName));
			}
			
			
		}
		catch (FileNotFoundException ex) {
			System.out.println("File " + file + " does not exist.");
			} 
		catch (IOException ex) {
			ex.printStackTrace();
		}
		finally {
			closeReader(bufferedReader);
			closeReader(playerReader);
			closeReader(resultReader);
		}
	}