@SuppressWarnings({ "resource" })
	public ConnectionTable(String filePath) throws Exception
	{
		BufferedReader bufferedReader = null;
		try 
		{
			bufferedReader = new BufferedReader(new FileReader(filePath));
			String currentLine = bufferedReader.readLine();
			while(currentLine != null)
			{
				if(!currentLine.isEmpty())
				{
					
					String[] namePair = getNamesFromInputLine(currentLine);
					
					if(namePair == null || namePair.length != 2)
						throw new Exception("File consists incorrectly formated input lines.Expected - 'name:name'");
					
					String person1 = namePair[0];
					String person2 = namePair[1];
					
					if(!setOfperson.contains(person1))
					{
						setOfperson.add(person1);
						connectionGraph.put(person1, new HashSet<String>());
					}
					
					if(!setOfperson.contains(person2))
					{
						setOfperson.add(person2);
						connectionGraph.put(person2, new HashSet<String>());
					}
					
					connectionGraph.get(person1).add(person2);
					connectionGraph.get(person2).add(person1);
				}
				currentLine = bufferedReader.readLine();
				
			}
			bufferedReader.close();
			
		} 
		catch (FileNotFoundException e) 
		{
			if(bufferedReader != null)
				bufferedReader.close();
			throw new IOException("File was not found. Check the path specified in the input");
		}
	}