
Originally Posted by
areeda
Like you, I'm fairly new with Android, I've written a couple of application but nothing of production quality yet. So please, take this as a discussion not an answer. I have done on-line testing applications for student pilots.
I'm not sure if I completely understand your program design. It sounds like you are developing a class for each question at compile time. I would suggest a class for each type of question (true/false, multiple choice, match) and a new object for each question created from the proper class.
I think you might be missing the runtime method for a TextView setText(CharSequence txt).
I would probably have an object constructor something like TFQuestion(String q, String t, String f, Boolean ans) that is derived from an abstract base class say Question;
Where you get the questions is another issue but for testing as a static array could look something like
Question[] myQs = {
new TFQuestion("Is joe a dork?","yes", "no", true);
new MCQuestion("How to improve joe's chances for a date","Hair transplants", "Weight Loss", "Divorce", "?" };
I hope I understood your question.
Joe
ps. I'm having trouble formatting this post. All new lines are being ignored.