I'm designing a multiple choice test...

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Musty
    New Member
    • Feb 2008
    • 15

    I'm designing a multiple choice test...

    ...And literally the only thing holding me back is how I 'switch between forms' is the best way to describe it.

    If anyone here has done an online test or something - you know when you select the particular radio button denoting your chosen answer from the multiple choices and click 'next question' it goes to the next screen for the next question right?

    Well, I want to do just that, I want to have 1 screen with 1 question, and then another 'item' added in (windows form right?) which will have the next question ready for the person to answer, and so on and so forth for however many questions I decide to put into the test.

    I'm using Microsoft Visual Studio 2003, and am currently using VB.NET script if that helps at all...

    Please get back to me asap!!

    Thanks very VERY much.
  • wimpos
    New Member
    • Jan 2008
    • 19

    #2
    Hi Musty

    I'm using C# in visual studio 2005 so I cannot give code examples, though I will provide you with an idea.

    First what you don't want to do is create a new form for each question, but you already figured that one out didn't you :)

    What you need is a component "Question", for instance a panel with a question, answers, a type (radio's or checkboxes), ...

    You can create an array of these "Questions"
    and every time someone hits NEXT, you save the answer and show the new "Question"

    I hope I make myself clear, if not please reply I'll retry

    Are you programming Object oriented?
    Wim

    Comment

    • Musty
      New Member
      • Feb 2008
      • 15

      #3
      Appreciate your reply - thats actually a very good idea!

      But in that case - how is one meant to ensure that the previous panel is replaced by the next? (I'm kinda waffly on arrays haven't sorted them out properly) - does the array of 'questions' mean I can literally have just one panel 'object' which keeps on changing itself with every question?

      Comment

      • Shashi Sadasivan
        Recognized Expert Top Contributor
        • Aug 2007
        • 1435

        #4
        Since you would have only multiple choice questions,

        you can always reuse the cotrols loaded in the panel.

        Which means you store all the questions and the possibble choices in memory,
        and load the question , and the choices into the labels / textboxes.

        Only if you have different question types would you want different types of panels which will have to loaded and removed.

        Comment

        • Musty
          New Member
          • Feb 2008
          • 15

          #5
          hi - so you're saying if there's like, 20 questions, have 20 different links on the left or right which takes u to each question, and make a 'next' link on each page which does the same thing for each particular question? Unless i grossly misperceived lol... (a bit like a PSL online test where you can go back to other questions)

          Comment

          • Musty
            New Member
            • Feb 2008
            • 15

            #6
            ok now visual studio has messed up - everytime i want to start a new project, it doesnt load anything, it just stays there, with the same projects menu at the start! It doesnt let me start editing the form or anything! What do I do??

            Comment

            • Shashi Sadasivan
              Recognized Expert Top Contributor
              • Aug 2007
              • 1435

              #7
              You could have it laid out the way you mentioned it, Its your imagintaion here, and how far you want to go with it.

              If you do have 20 questions loaded into the memory, then you should be holding the index of the collection which is being displayed, so a prev and next link button would be -1 or +1 the collection index.

              I presume that this is windows form (as you mentioned about it in your first post).
              So when ever you click the prev / next buttons then you can implement the code within that.

              I havent had experience with VS 2003, not sure whats going wrong. Have you tried Rebooting your computer?

              Comment

              • Musty
                New Member
                • Feb 2008
                • 15

                #8
                hey sashi

                yeh just realised I was trying to create a blank form rather than a windows application! Lol I feel very dumb...

                The idea sounds good - but do you mean I would have to type in the questions every time the program starts or could I have them already there and allocate them to each 'panel' representing the next question?

                As for the scoring system yep this seems very plausible indeed - I guess the only thing left to do now is make it look as good as possible visually!

                Thanks very much for your help and time guys.

                Comment

                • Musty
                  New Member
                  • Feb 2008
                  • 15

                  #9
                  Actually you know what - I like the panel idea better that seems a lot more plausible given the amount of time I have to play with... In which case - how do I program the application so that on the first click of the 'next' button it displays the second question, second click - third question, third click - fourth question, and so on (you can see why I'd find it so much easier to just work with say - 20 different forms which show the instructions of the test and then allow the user to hit 'next page' or 'next question' and have them answer the second question!)

                  Is this possible? Please get back to me asap!

                  Comment

                  • Shashi Sadasivan
                    Recognized Expert Top Contributor
                    • Aug 2007
                    • 1435

                    #10
                    You should have a list of questions that you want the user to answer, and keep an index on which question the user is upto.'

                    if the next or the back button is clicked you need to fetch the question at next / previous index.

                    Since you want to create an entirely new panel for each question (which would be dynamic i suppose), you may want to do that when the buttons are clicked!

                    Comment

                    Working...