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
- please answer the given the below question in details. with examples or samples.
- What would the final equation be for the transformed graph? f(x)=x^2 shift down 6 f(x)=square root of x shift to the left 7 f(x)=4 square roots of x reflect
- A ball roll off a platform that is 5 meters above the ground the ball’s horizontal velocity as it leaves the platform is 6 m/s how much time does it take for