Develop a
JAVA servlet/
JSP application:
Have a set of at least 10 questions and their corresponding answers. Please do not use a database to store these. You may use a file or use static variables in your code for the Q&A. Every time the application is accessed it would show a question and a multiple choice of 4 answers. It would wait for the user input (through radio buttons and 'submit' button).
If user input is correct, it displays "Congratulations. Your answer is correct!"
If user input is incorrect, it displays "Sorry. The correct answer is xxx"
After every Q&A, it would ask the user if he wants to answer another question. If 'yes', then it displays another question from the pool. If 'no', then it says "Bye. Please Visit Later"
NOTE:
1. The questions that are displayed should be randomly selected so that every time the application is loaded, the user is presented with a different question
2. In any given Q&A session, the system should not display the same question twice
I have develop the following 10 JSP's for each question.
JSP1.jsp
S_JSP1.jsp
I want to ask how to achieve the following...
NOTE:
1. The questions that are displayed should be randomly selected so that every time the application is loaded, the user is presented with a different question
2. In any given Q&A session, the system should not display the same question twice