Previous and Next button Problem
-
At which point do you stuck ? I think, at first you have to build up a kind of collection in which all Page-Contents are memorized, the selected answers and also the order of appearance. After that you build up a Page, which has the 2 Buttons which increase or decrease the Collection-Pointer and which displays the Collection-Content at pointer-position.
I used a loop with total number of question a user can answer.. so when it clicks next. it gets incremented by one.. example Is a user can answer 10 questions and he is on number 7, he now moved back to question two, how do I program it to fetch what's on question two and when he is done , he won't see different questions from 4-7 he already did and also move on to complete the questions.. I am really struck there, please help me
-
I used a loop with total number of question a user can answer.. so when it clicks next. it gets incremented by one.. example Is a user can answer 10 questions and he is on number 7, he now moved back to question two, how do I program it to fetch what's on question two and when he is done , he won't see different questions from 4-7 he already did and also move on to complete the questions.. I am really struck there, please help me
As I have written before : I would create a class which could memorize all the necessary information - for example the question-text, the given answer and so on (all what you think that you need). Now you initialize your question-catalogue - each question is stored in this class-variable and the class is stored in the collection. How much experience do you have with classes, collections, dynamic creation of classes ? Could you imagine, what I tried to explain you ?
-
As I have written before : I would create a class which could memorize all the necessary information - for example the question-text, the given answer and so on (all what you think that you need). Now you initialize your question-catalogue - each question is stored in this class-variable and the class is stored in the collection. How much experience do you have with classes, collections, dynamic creation of classes ? Could you imagine, what I tried to explain you ?
six month now...
-
six month now...
OK ... you understood what I have decribed ? How should we go further ?
-
OK ... you understood what I have decribed ? How should we go further ?
yes i do. we can go further with practical examples ( probably a simple sample code) or what do you think?
-
yes i do. we can go further with practical examples ( probably a simple sample code) or what do you think?
OK ... of course ... I suggest that you create a class with the (from your point) necessary properties. After that I need to know which Information out of your database should be stored for questioning. Then we could fill the from me suggested collection with the new class-items which could be used (later) for your visualisation on the form. It's your turn ... ;)
-
OK ... of course ... I suggest that you create a class with the (from your point) necessary properties. After that I need to know which Information out of your database should be stored for questioning. Then we could fill the from me suggested collection with the new class-items which could be used (later) for your visualisation on the form. It's your turn ... ;)
yes i have created a class called "Bank"for the questions, it has the questions, options and correct answer, and its selecting per group (i.e. for a particular subject example English) i have the properties as follows public property questionNo as String public property question as String public property optionA as String public property optionB as String public property optionC as String public property CorrectAnswer as String
-
yes i have created a class called "Bank"for the questions, it has the questions, options and correct answer, and its selecting per group (i.e. for a particular subject example English) i have the properties as follows public property questionNo as String public property question as String public property optionA as String public property optionB as String public property optionC as String public property CorrectAnswer as String
OK ... Now you should create the Collection for the Animation/Visualisation. This could work like this :
dim QuestionCollection as new collection
Sub Initialize_Collection
QuestionCollection.clearfor i as integer = 1 to 10 dim myBank as new Bank myBank.QuestionNo = "" ' assign the Question-No. here myBank.Question = "" ' assign the Question-Text here myBank.OptionA = "" ' assign the Option-Value A here myBank.OptionB = "" ' assign the Option-Value B here myBank.OptionC = "" ' assign the Option-Value C here myBank.CorrectAnswer = "" ' assign the correct Answer-Text here myBank.Result = false ' you should add a boolean as result for the question to
your class
QuestionCollection.add (myBank)
next
End Subnow you could work with this Collection on your Form. With your Buttons you should select the index from the Collection-Entry and put the data of it to your Form-Labels/TextBoxes/OptionButtons etc. Do you understand what I mean ?
-
OK ... Now you should create the Collection for the Animation/Visualisation. This could work like this :
dim QuestionCollection as new collection
Sub Initialize_Collection
QuestionCollection.clearfor i as integer = 1 to 10 dim myBank as new Bank myBank.QuestionNo = "" ' assign the Question-No. here myBank.Question = "" ' assign the Question-Text here myBank.OptionA = "" ' assign the Option-Value A here myBank.OptionB = "" ' assign the Option-Value B here myBank.OptionC = "" ' assign the Option-Value C here myBank.CorrectAnswer = "" ' assign the correct Answer-Text here myBank.Result = false ' you should add a boolean as result for the question to
your class
QuestionCollection.add (myBank)
next
End Subnow you could work with this Collection on your Form. With your Buttons you should select the index from the Collection-Entry and put the data of it to your Form-Labels/TextBoxes/OptionButtons etc. Do you understand what I mean ?
Yes, i understood it a bit. like am creating a new List(of Collection) . and the loop means the user has 10 questions to answer, can you explain further please.. sorry for bothering you this much
-
Yes, i understood it a bit. like am creating a new List(of Collection) . and the loop means the user has 10 questions to answer, can you explain further please.. sorry for bothering you this much
NO ... if you want to do it with a List then you have to use a List (of Bank) - not of collection. Either a collection or a generic List. When you generate the List (or collection) you create severall instances of Bank (your class-definition). Each Instance should be filled with the needed data - for example the question-text and so on. Please think a bit - some of the work should be done by you ... :cool:
-
NO ... if you want to do it with a List then you have to use a List (of Bank) - not of collection. Either a collection or a generic List. When you generate the List (or collection) you create severall instances of Bank (your class-definition). Each Instance should be filled with the needed data - for example the question-text and so on. Please think a bit - some of the work should be done by you ... :cool:
i know right.. let me work more on myself, i would get back to you. thanks alot, i really appreciate. God bless you
-
i know right.. let me work more on myself, i would get back to you. thanks alot, i really appreciate. God bless you
No ... we could work together. That is no problem ... But my wish was : TOGETHER ... and not me alone ... So ... please show me your results and we could speak further ...