where shoule store the questions and answers

  • Thread starter Thread starter Sukh
  • Start date Start date
S

Sukh

I have to design a "Online Test Application" and application is going
to display question and answers.All the questons are objective type so
there is four answer for each question.
My Question is where I shuld store the questions and answers. and how
application can pick randomly question. right now I have all question
in a text file.

Please give me suggestion. I am using C# and asp.net for this.
Regards,
Sukh.
 
Sukh said:
I have to design a "Online Test Application" and application is going
to display question and answers.All the questons are objective type so
there is four answer for each question.
My Question is where I shuld store the questions and answers. and how
application can pick randomly question. right now I have all question
in a text file.

Please give me suggestion. I am using C# and asp.net for this.
Regards,
Sukh.

Try SQL Server or SQL Server Express edition dbms :)

Mythran
 
You can use the text file, a XML file or a database (Access, SQL Server
Express, etc). If using files, they can be outside the assembly or embedded
inside it.

--

Best regards,

Carlos J. Quintero

MZ-Tools: Productivity add-ins for Visual Studio
You can code, design and document much faster:
http://www.mztools.com
 
Sukh said:
I have to design a "Online Test Application" and application is going
to display question and answers.All the questons are objective type so
there is four answer for each question.
My Question is where I shuld store the questions and answers. and how
application can pick randomly question. right now I have all question
in a text file.

You could have your text file formatted like
question1<tab>correct answer<tab>wrong answer 1<tab>wrong answer
2<tab>wrong answer 3
question2<tab>correct answer<tab>wrong answer 1<tab>wrong answer
2<tab>wrong answer 3
question3<tab>correct answer<tab>wrong answer 1<tab>wrong answer
2<tab>wrong answer 3

then read in each line into an ArrayList and store it in a session
variable.

To present a question, choose a random integer between 0 and your
arraylist.length-1, and separate out the parts with String.Split.
Present the potential answers in a random order. Delete the entry in the
ArrayList so it doesn't get asked again. Store the modified ArrayList
back in the session variable.

(Some people might advocate using XML for the file format.)
Please give me suggestion. I am using C# and asp.net for this.

You might want to post in a C# newsgroup instead.

Andrew
 
Back
Top