public void GenerateBooksFromFile(string filePath) { List <string> bookStrings = new List <string>(); FileHandling.ReadFromFile(filePath, out bookStrings); foreach (string book in bookStrings) { string author; Books.Add(new Book(SplitBookNameAndAuthor(book, out author), author)); } }
public void GenerateReaders(string fileFemaleNames, string fileMaleNames, string filePathSurnames, int numOfReaders) { List <string> femaleNames = new List <string>(); List <string> maleNames = new List <string>(); List <string> surnameStrings = new List <string>(); FileHandling.ReadFromFile(fileFemaleNames, out femaleNames); FileHandling.ReadFromFile(fileMaleNames, out maleNames); FileHandling.ReadFromFile(filePathSurnames, out surnameStrings); FillReadersFromLists(femaleNames, surnameStrings, "female", numOfReaders / 2); FillReadersFromLists(maleNames, surnameStrings, "male", numOfReaders / 2); }