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.txt
and report.png
are in the hw02
directory inside your repo.
In the report, answer the questions given in the step-by-step instructions below.
Homework02
in the package edu.sjsu.cs175.hw02
.Quiz.read
, so I am sure you'll have something to write about.)read
methods 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 must
use an new AsyncTask<String, Void, Quiz>
(b) Your list adapter should be an ArrayAdapter<Question>
, not an ArrayAdapter<String>
. (c) You should pass a Question
object, not the Quiz
object, into the intent for showing an individual question.Quiz
class need to be serializable? Explain in your report./tmp
, then build and run the program from the command line (not Eclipse)./tmp
.