+ 1

How to create a table of questions and answers in order of points scored for a quiz in Java?

I have a movie quiz in Java that has arrays, Abstraction Data Types, loops within loops, and keeps score for correct answers. Is it possible to create a table of the questions and corresponding right answers in order of points scored for a quiz in Java so the quiz taker can review? Not sure how to implement. Still new to programming btw, only been coding 2 months ā˜ŗļø

14th Nov 2018, 7:18 PM
Moe
Moe - avatar
6 Answers
+ 5
Moe Totally worth it :)
14th Nov 2018, 9:49 PM
Tashi N
Tashi N - avatar
+ 4
You could use a TreeMap that contains a HashMap<String, String> entry (Strings for the questions and answers) and the corresponding Integer or Float for the points. So you need two Maps, e.g. HashMap<String, String> quiz; TreeMap<Integer, HashMap> results; // can be ordered by key Something like that ;)
14th Nov 2018, 9:40 PM
Tashi N
Tashi N - avatar
+ 3
Roneel just in order of correct answers and wrong answers at the bottom. time is not taken into account.
14th Nov 2018, 7:27 PM
Moe
Moe - avatar
+ 3
Tashi N Hmmm never done that before, will Google it lol. Thanks.
14th Nov 2018, 9:44 PM
Moe
Moe - avatar
+ 2
I can't understand sorting in order to points scored for a quiz. Means for each quiz, there can be different points based on time taken?
14th Nov 2018, 7:23 PM
Roneel
Roneel - avatar
+ 2
Still can't get my head into it.šŸ¤” If only correct and wrong, only two possibility and sorting will be just like dividing into two parts-correct and wrong. Anyway, I am going to study now. Maybe give it a shot tomorrow.
14th Nov 2018, 7:35 PM
Roneel
Roneel - avatar