/* public FileAccess(QuestionManager manager) * { * this.Questions = manager; * } * * public QuestionManager Questions { get; }*/ // TODO: We'll need a way to load questions from a file and add them in to a QuestionManager public void LoadQuestions(QuestionManager manager) { using (StreamReader reader = new StreamReader(filePath)) { while (!reader.EndOfStream) { string line = reader.ReadLine(); // Each line looks like "1,What’s the difference between C# and .NET?" string[] parts = line.Split(","); // | tomorrow int id = int.Parse(parts[0]); string name = parts[1]; InterviewQuestion question = new InterviewQuestion(name, id); manager.Add(question); } } }
// TODO: This class should provide a way to add an interview question public void Add(InterviewQuestion question) { this.items.Add(question); }