Using C#
Create the “TestQuestion†class. It will have two classvariables: 1) a question and 2) the answer to that question. Pleasecreate an accessor and mutator method for both of those variables,without which we would not be able to see or change the question orthe answer.
There should be a constructor method. We will also have a“ToString†or “__str__†method, which will print the questionfollowed by its answer.
The constructor method has two parameters to allow the user toenter a test question and answer, or if no input/parameters aregiven then a default question and answer should be supplied.
The last method of the class, CheckAnswer, should take in astring as a parameter and compare it to the answer. If the inputwas incorrect, it should return false. Otherwise, it should returntrue and then the main should tell the user they were correct andhave them input a new test question and answer.