Click here to Skip to main content
15,032,431 members
Please Sign up or sign in to vote.
1.00/5 (4 votes)
See more:
Hello, i have to make a quiz with 10 questions in Java, it needs to score each question..and also i need to make it reset at the end. But, i am first stuck on how to do the pseudocode for it, like what to write on my paper..any input?

What I have tried:

So far i have.. Question 1 --- 1 for one answer, 2 for the other answer --- correct 1 point, wrong no point (Say your right "if correct" ) . (say your wrong " if not correct" )
Posted
Updated 10-May-18 14:05pm

1 solution

Think about what are the requirements of the quiz:
- it needs a list containing 10 questions and their associated answers; or maybe two lists.
- it needs to display the questions in some order, 1 to 10, or random.
- it needs to accept the answer form the user and check for right or wrong answer.
- it needs to keep track of the score, and print the result at the end.
   
Comments
Member 13819558 9-May-18 15:03pm
   
Okay thanks, is what i have so far a good start?
Richard MacCutchan 10-May-18 4:04am
   
Looks fine to me.
Member 13819558 10-May-18 10:57am
   
Okay thanks, any input or example of how i would start this in my code? So far i got.. package "the name of it" , import java.util.scanner;
Richard MacCutchan 10-May-18 11:03am
   
Like I said above: think about what you are trying to do. Don't try and write any code until you have a good outline design written out, and pseudocode to fill in the gaps. What use do you think a package name and a scanner are going to be, until you have designed your question class, and decided what properties and methods it may require?
Member 13819558 10-May-18 11:21am
   
Okay yeah true
Richard MacCutchan 11-May-18 3:21am
   
I am sorry but you have ignored all my comments and suggestions above: Forget about writing code until you have a proper design written down on paper. And why are you trying to create multiple variables with the same names, and how do you expect to assign string values to variables declared as integer types?

You really need to go back to your study notes and learn the basics. Or, for structured tutorials go to The Java™ Tutorials[^]

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)




CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900