public void JustParseNames() { try { Names = FileParser.ParseFile(); } catch (IndexOutOfRangeException) { Console.WriteLine("You have not designated a file to parse"); } catch (Exception ex) { Console.WriteLine(ex.Message); } }
public void DoSortingWork() { try { Names = FileParser.ParseFile(); NameSorter.SortNames(this.Names); FileWriter.WriteFile(this.Names); } catch (IndexOutOfRangeException) { Console.WriteLine("You have not designated a file to parse"); } catch (Exception ex) { Console.WriteLine(ex.Message); } }
public SorterProgram(String fileName) { FileParser = new FileParser(fileName); FileWriter = new FileWriter(fileName); NameSorter = new NameSorter(); }