@SuppressWarnings("unchecked")
	public void tabulateSurvey(Survey s) throws IOException{ //Takes a Survey given by the user and shows all response results for the Survey.
		Survey surv = s;
		ArrayList<ArrayList<Response>> resp = new ArrayList<ArrayList<Response>>();
		
		final File dir = new File("responses");
		if (!dir.exists()){ // files folder does not exist
			Out.getDisp().renderLine("Folder \"responses\" not found. Please take the Survey first to create this folder and populate it with responses.");
			return;
		}else{ // files folder does exist
			for(final File fileEntry : dir.listFiles()){
				
				String ext = fileEntry.getName().substring(fileEntry.getName().lastIndexOf(".") + 1, fileEntry.getName().length()); //Take the extension of each file
				if (ext.equals("resp")){ //If the extension is .resp, check for the right survey
					String surveyName = fileEntry.getName().substring(0,fileEntry.getName().indexOf("_")); //Take the Survey/Test name in the response file
					if (surveyName.equals(surv.getName())){ //If it is the right survey, add to the list of files
						//Deserialization
						try
					      {
					         FileInputStream fileIn = new FileInputStream("responses/" + fileEntry.getName());
					         ObjectInputStream read = new ObjectInputStream(fileIn);
					         resp.add((ArrayList<Response>) read.readObject());
					         read.close();
					         fileIn.close();
					      }catch(IOException i)
					      {
					         i.printStackTrace();
					         return;
					      }catch(ClassNotFoundException c)
					      {
					         Out.getDisp().renderLine("Response not found.");
					         c.printStackTrace();
					         return;
					      }//try catch
					}//if (surveyName.equals(surv.getName())) 
				}//if (ext.equals("resp"))			
			}//for(final File fileEntry : dir.listFiles())
		}//else
		
		if (resp.size() == 0){
			Out.getDisp().renderLine("No responses found for this Survey.");
		}else{
			surv.tabulate(resp); //Tabulate the ArrayList of ArrayList of Responses
		}
		
	}