1. Engineering
  2. Computer Science
  3. how would i create the following in c the questionbank...

Question: how would i create the following in c the questionbank...

Question details

How would I create the following in c++?

The QuestionBank Class

C) QuestionBank questions : std::vector<Question> questionsFile : std:ifstream Questi on Bank (std: string) void LoadQuestions() : void ● Questį on Bank () ● GetNexto uestion(): Question

This class is a container class that is responsible for reading the input file and storing a list of questions.

  • QuestionBank (std::string)
    • This parameterized constructor accepts a filename as an std::string where the questions to be loaded reside.
  • void LoadQuestions()
    • This helper function should read the file and instantiate the questions one by one, adding them to the questionsvector.
  • GetNextQuestion()
    • This function should return a question from the list for use by the Game class, described below.
Solution by an expert tutor
Blurred Solution
This question has been solved
Subscribe to see this solution