- Home /
What's the best way to record and tabulate stats in different categories?
I'm working on a game where people will answer different questions that cover multiple categories, and these will be presented in a series of tests. I want to store the results of the questions (whether the answers were correct or incorrect) in such a way that I'll be able to later retrieve different stats and data about the results.
For example, let's say one test had two questions about history and one question about science. The next test has two questions about science and one question about politics. The third test has one question in each category. What I'm trying to figure out is a way to store the information of how those questions were answered, that will allow me to keep dynamic statistics (it won't be limited to just three tests) about the number or percentage for each test, for each category, and for all the questions thrown together (and potentially more stats as I think of them).
My first thought is that this is the kind of thing that would be best stored in a separate data file, but are there other ways that are better or more flexible? It seems like I could keep the basic "did you get the question right or wrong" data in a List, but I'm not sure how I could do the stuff with question categories and partitioning off multiple tests in a List format.