CISC181 S2017 Lab10

From class_wiki
Revision as of 10:53, 1 May 2017 by Cer (talk | contribs) (Instructions)
Jump to: navigation, search

Preliminaries

  • Make a new Android project with n = 10 following these instructions through step 6. On step 7 "Select form factor...", switch over to step 4 on the Android developers page tutorial here and complete through step 6 which ends with "...click Finish". Make the default activity be called "StartActivity" (see below -- you will add two more).

Instructions

You will create a simple trivial quiz game Android app. The app will have 3 activities: StartActivity, QuestionActivity, and ScoreActivity that work together in the following way:

  • StartActivity
    • This is the title screen, so you should print your game's name and its author (you) here
    • There are two options: number of questions (either 5 or 10), and answer type (multiple choice vs. free response)
    • A button to start the game. This should start the QuestionActivity, with the option values added to the Intent as extras
    • A button to quit
  • QuestionActivity
    • Here you will progress through the number of questions indicated in the Intent that started the activity, and display them in the format chosen by the user
    • If the option is free response, the answers are not shown and the user must type a string into an EditText view
    • After each answer is given, use a Toast to tell the user if they are right or wrong, and go on to the next question
    • After the last question is answered, automatically start the ScoreActivity. Pass the total number of questions and the number of correct answers as extras in the Intent
  • ScoreActivity
    • Report the user's score and, based on their percentage correct, write an appropriate evaluation message (e.g., "Wow, 100%! You are smart!" or "Hmmm...you need to study more")
    • Have a button to take the user back to the StartActivity

You will need an external file to store at least 20 questions and 2-4 possible answers per question. This should be read by your program and turned into a data structure that QuestionActivity can easily use. The 5 or 10 questions that you present to the user for a given quiz should be randomly chosen from the overall pool.

You can make up these questions yourself or find them online. Here's a set I found that you can grab to save time.

Submission

Submit your entire project directory (code + resources) to Sakai.