#Made a Java Quiz with very fat code

4 messages · Page 1 of 1 (latest)

stuck sierra
#

I made a Quiz method that features 10 question and i made it too long. I think I can use an arraylist for the facts? Please help me by giving me ideas on how to make it smaller.

distant crowBOT
#

This post has been reserved for your question.

Hey @stuck sierra! Please use /close or the Close Post button above when your problem is solved. Please remember to follow the help guidelines. This post will be automatically closed after 300 minutes of inactivity.

TIP: Narrow down your issue to simple and precise questions to maximize the chance that others will reply in here.

runic granite
#

Use OO. Example a question class with the question, answer and explanation as variables. You can have a method in there that checks an answer. Then you can have a list of question objects which you iterate through