It allows a user to choose which test to take and then delivers questions from the selected
test for the user to answer. The program also marks the test and displays a score when
the test is completed.
Your program should use two Forms as follows:
• The initial or “Test Form” will permit the user to choose a test.
o The user selects a test from a list of choices . The choices are actually the
names of text files without the extension “.txt”. Your program will
obtain the list of tests by reading a file called “TESTS.txt” and display
them in a ListBox.
o The selected test will be displayed in a ReadOnly TestBox on the Test
Form. The user may change the selection or proceed.
o To start the test the user will click a “Begin” button.
o A ReadOnly TextBox will be used to display the score for the test when it
is completed. The score should be displayed as a String with the format:
“correct / total” where “correct” is the number of correct answers and
“total” the total number of questions.
o The user should be able to select another test to take.
• The second or “Question Form” opens when the user clicks on the “Begin” button
of the Test Form. This Form delivers questions one at a time to the user from the
test file selected by the user on the Test Form.
o Each line of a test file consists of a question and the correct answer, either
T or F. The question and its corresponding correct answer are separated
by a comma.
o Questions are displayed one-at-a-time to a user in a TextBox. The number
of the question is also displayed in a TextBox to the left of the TextBox
containing the question.
o The user types the answer into a TestBox. An “Enter” button is used to
submit the answer and evaluate it. A valid answer must begin with either
“T” or “F” in either upper or lower case. If an invalid answer is provided,
including no answer, a message requesting a valid answer should be
displayed in a TextBox. This “error message” textbox should not be
visible unless an error occurs. It should be made invisible again after the
user enters a valid answer and presses the “Enter” button.
To test your program, use NotePad to create at least three text files. One text file should
be named “TESTS.txt”. The other files are the tests and can be named whatever you
wish. Each line of each test file should provide the text of one true-false question and its
correct answer, separated by a comma. Once they have been created, the names (without
the extension “.txt”) of your test files should be placed in the file “TESTS.txt”, one
name per line.
Recently Asked Questions
- ¡Qué sorpresa! Fill in the blanks with the correct forms of the verbs in parentheses. Use the present perfect indicative or present perfect subjunctive,
- What are the five categories of financial ratios and provide an example of one from any public company you like, for each category.
- The Agate Corporation manufactures and sells two types of bookcases , standard and deluxe . Agate expects the following operating results next year for each