CPSC 110 -- Computing With Mobile Phones
Fall 2011

Quiz App

This app will read a quiz from a TinyWebDb and present the quiz to the user through a simple User Interface. It provides feedback on whether the user's answer is correct or not, but does not keep score.

In TinyWebDb a quiz must be represented as follows. First there must be a tag giving the name of the quiz associated with a list of >question ids for each quiz question. Then, each quiz question must take the following format:

["Quiz question in double quotes.", ["Answer 1", ..., "Answer 4"], CorrectAnswer]

Note the use of quotes, commas-between-list-elements, and square brackets to make the answer sublist. Single word answers, such as "True" or "False", needn't occur in quotes. The correct answer is the number of the correct choice. A maximum of 4 possible answers may be given.

Here's an example:

samplequiz[sq1, sq2, sq3]
sq1["Roses are red and violets are blue.", [T,F], 1]
sq2["Which is largest?", ["The sun", "The moon", "The earth"], 1]
sq3["Which is a prime number", [4, 7, 9, 21], 2]

Version 2

Version 2 of the app automatically downloads the quiz data when the app starts (using Screen.Initialize). The "Download Quiz" button can still be used to download a different quiz. Version 2 stores the downloaded quiz data in a TinyDb. If there is data in TinyDb, it is used. If no data, a quiz is downloaded from TinyWebDb.

Download It

ScreenshotVersion 1
No TinyDb
Version 2

Android Package: QuizApp.apk

Android Package: QuizAppV2.apk
App Inventor Source Code: QuizApp.zip Source Code: QuizAppV2.zip