Your task is to write an Android application that reads and displays quiz questions. Read the questions from this file The contents may change when your assignment is graded, but the format is the same. Each question is followed by n choices (not necessarily four), the correct choice having a
*. A blank line or (for the last question) the end of the stream follows.
In the first screen, show a list of all questions. It is ok if they get truncated with a ...
When a user selects a question, show a list of all choices.
When a user selects a choice, tell the user whether they did it right or not.
Have a button "Back" in that screen that returns to the first list (not the second).
Your solution should have a class
Quiz and a class
Question. Each of these classes should have a method
void read(Scanner in).
You check in a project that solves the assignment together with a report in a file
report.txt. Use plain text, not Word or RTF, or you won't get credit for the report. Make sure that
report.png are in the
hw02 directory inside your repo.
In the report, answer the questions given in the step-by-step instructions below.
Homework02in the package
Quiz.read, so I am sure you'll have something to write about.)
readmethods work. It's a good idea to test these outside Android, with a trivial Java SE test program. If you did that, tell me in your report.
em mustuse an
new AsyncTask<String, Void, Quiz>(b) Your list adapter should be an
ArrayAdapter<Question>, not an
ArrayAdapter<String>. (c) You should pass a
Questionobject, not the
Quizobject, into the intent for showing an individual question.
Quizclass need to be serializable? Explain in your report.
/tmp, then build and run the program from the command line (not Eclipse).