public void TestReadFile(String fileLocation, int fileLines) { Console.WriteLine("Testing Read From File\n"); Customer[] customerArray = ReadFromFile.CustomerList(fileLocation, fileLines); customerArray [0].DisplayInfo(); customerArray [fileLines - 1].DisplayInfo(); // end of test Console.WriteLine("\nEnd of testing read file, press any key to continue ....\n"); Console.ReadKey(); }
public static void Main(string[] args) { Test t = new Test (); t.TestCustomers (); t.TestReadFile (fileLocation, fileLines); t.TestDateUtilities (); Customer[] customerArray = ReadFromFile.CustomerList(fileLocation, fileLines); // Menu loop bool running = true; while (running) { int option = Menu.DisplayMenu(); switch (option) { case 0: running = false; break; case 1: Menu.MakeDeposit(customerArray); break; case 2: Menu.MakeWithdrawl(customerArray); break; case 3: Menu.GetMaximumBalance(customerArray); break; case 4: Menu.GetMostActive(customerArray); break; case 5: Menu.GetYoungest(customerArray); break; case 6: Menu.GetLeapYearCustomers(customerArray); break; } } // end of Menu loop Console.WriteLine("\nEnd of program, press any key to continue ..."); Console.ReadKey(); } // end of Main method