Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 6

LINK TO MY VIDEO IMPLEMENTATION

https://www.youtube.com/watch?v=mEkdT9R2UwI

Christian Vargas
Course: CST 338 - Software Design
Semester: Spring 2022

(Final Project) Trivia Quiz Game Android App (10 hrs)

Understand the Problem

For this project we are going to be using Android Studio to create a simple Android app for a
trivia quiz game with at least 3 screens that implements the Model View Controller (MVC)
design pattern. This trivia quiz game can have as many categories to be quiz on. For the purposes
of this assignment, this project will be a made up application called Trivia Night with random
topics you’re interested in. Additionally, this will be an offline game meaning no database will
be required for either the list, bank, activity, or results of the quiz.

For more information on MVC the following GeeksforGeeks page offers a great start, MVC
Design Pattern. Before moving on, we will first need to install it and get familiar with the tools
of Android development. The Android Developer Documentation and this Android Development
for Beginners course by freeCodeCamp, hosted on YouTube can be particularly useful.

After reading the documentation and watching the video we should understand how to have the
phone emulator running and then how to create a custom Android Virtual Device (AVD).

Another useful thing to consider moving forward is understanding MainActivity.java, which


loads by default when your app runs unless you choose a different name for it right at the start.
We should also understand some basics on placing widgets.

Phase 1: Design of Android App

1. Before proceeding please make sure that you understand MVC Patterns and basic
Android development.
2. At the top of the Homepage using ImageView add an icon for the name Trivia game.
3. Change the background color and the color of the text.
4. Using TextView, add some text or indication of the topic of trivia offered.
5. Each topic should have a frame around the topic with curved borders.
6. Add an image to each topic.
7. It might be the case where you have most items that will fix on one page screen without
scrolling, this is fine. However, please be aware that by default ListView is scrollable and
there’s no need to put ListView inside a ScrollView.
8. When you select a topic by clicking it should follow that you click something like “Start
game” or “Play” in order to begin the actual gameplay. Here it will launch a new activity
with the actual questions.
9. The questions will all be multiple choice. Please do not add any True/False questions.
10. The user should be able to see whether they got the right or wrong answer here and not
have to wait till the end of the game. If the user selected the wrong answer, add some
type of way in which the user is shown the correct answer.

Phase 2: Grade Sheet (Trivia Quiz Results)


1. Once a topic quiz is done this screen will appear and serve as a grade sheet, which will
include:
a. Total number of questions both correct and incorrect.
b. Optional: Generate the list of questions answered incorrectly on this page. This
can be something like “Question 1, 2, 7 were answered incorrectly.”
c. Add an image indicating that the game is over.
d. Allow the user to go back to Homepage and play again or choose another trivia
topic.

Phase 3: Game Timer for Gameplay (Multithreading)


1. Next, we want to add a timer for when the game play starts. This will involve the use of
Multithreading.
2. You are free to choose the time, for example thirty seconds would make sense. The clock
should restart for each question.
3. If the user goes over the time they will automatically get the question wrong. You can
always test this by altering the timer code to something like five seconds for a faster
check.

Phase 4: Create the UML Diagram


Create a UML diagram that represents the structure of the program. The UML should clearly
indicate the Model portion, the View portion, and the Controller portions of the program.

Test Run Requirements:


Be sure to check to confirm the score given at the end of each trivia topic is outputting the
correct answer. For example, if someone answered five out of ten questions correctly, then once
the category quiz is done the program should display something like:
“5 questions correct
5 questions incorrect”

Be sure to check the timer is ending the game once it reaches zero and not counting down into
“negative time.” Again, the timer should not change per question. The user should be given a
specific time to complete the entire trivia game, preferably only one minute.
Below are some screenshots of my own implementation of the specifications:

Home Screen:
Trivia Question Screen:
Trivia Results Screen:
Ideas for Future Additions:
1. Use API to add trivia questions and answers.
a. One potential option is https://opentdb.com/api_config.php, but there are many.
This would add much more functionality and save a lot of the hassle in that the
API would allow the user to auto generate the number of questions, category,
difficulty level of questions, and genre of question. There would be no need to
hard code any of the trivia questions.
2. Background Music Player:
a. Implement a constant music soundtrack across all activities. When the application
starts up the audio file will start playing and continue looping through all
activities.
b. It might be useful to add a toggle button to start/stop the music.
c. Create a class for this sound file to play on repeat upon booting the app and also
continue without interruption when changing activities.
3. Random Topic Generator Button:
a. Add a trivia topic button called “Random Topic” that randomly chooses a topic
from the list of topics for the user.

Submission:
1. Include a separate zip file with screenshots of your AVD running. There should be a
minimum of 3 screenshots:
a. The homepage of the app when it first runs.
b. Two images showing a question from any two categories of the game.
c. An image showing the Activity page once one of the trivia categories is
completed. This should have some type of score and a button to play the trivia
game again.
2. Be sure to indicate the requirements to run the program in regards to the custom AVD.
3. There are three parts that need to be submitted for this assignment:
1. First, zip up the folder that was created from the Android App and submit it.
2. Second, a zip of the three screenshots.
3. UML Diagram and Flowchart

You might also like