Question: Write a C++ program to read in various types of test questions (multiple choice and True/False) from a test bank (text file), and load the
Write a C++ program to read in various types of test questions (multiple choice and True/False) from a test bank (text file), and load the questions into an array of questions. You will need to implement the following class hierarchy (given in UML):

Once the test bank has been loaded, simply iterate over the array of questions and have each question printed out to the screen.
The test bank (text file) will have the following format:
Line 1 will be an integer value, indicating how many questions in the file
Each question will start with a line that starts with either "MC" or "TF" followed by a space and then the point value of the question.
The next line will be the actual question.
If the question was True/False, the following line will be the answer, either "True" or "False"
If the question was multiple choice, the following line will be an integer value indicating how many choices will be provided for that question. The following lines will be the choices. There will never be more than 6 choices. The final line following the choices will be the answer: "A" or "B" or "C" or "D" or "E" or "F".
A sample test bank file is as follows:
3
TF 5
Are their 50 states in the US?
true
MC 10
Which one is not a state in the US?
6
Georgia
Florida
New York
Rio
Alabama
California
D
TF 10
Does the state Florida have a city called Panama City?
true
Question question string value integer Question the Question string pointvalue integer getQuestion string get value integer virtual prin toptions string virtual get Answer string Question Question TF MC string options string Question theQuestion string, pointvalue integer, TF Question TF theg tion string, pointvalue integer, theAnswer string) printoptions string always returns (true/false)" the Answer string) addoption Option string) getAnswer string t print options string getAnswer string
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
