Beispiel #1
0
 public static FileReader GetFileReaderForInput(string filepath, BankSystemDisplay display)
 {
     if (filepath.EndsWith(".csv"))
     {
         return(new CSVFileReader(filepath, display));
     }
     else if (filepath.EndsWith(".json"))
     {
         return(new JSONFileReader(filepath, display));
     }
     else if (filepath.EndsWith(".xml"))
     {
         return(new XMLFileReader(filepath, display));
     }
     else
     {
         throw new FileNotFoundException("File wasn't loaded: that file type isn't supported.");
     }
 }
 public ConsoleBankSystemInput(Bank bank, BankSystemDisplay display)
 {
     this.BankSystem = bank;
     this.Display    = display;
 }
 public CSVFileReader(string filepath, BankSystemDisplay display)
 {
     this.Filepath = filepath;
     this.Display  = display;
 }