diff_months: 19

ITECH2000 Mobile Development Fundamentals – Trivial Pursuit App

Download Solution Now
Added on: 2022-10-18 09:38:56
Order Code: 471212(2)
Question Task Id: 0

1.App Details

Your assignment is to develop an Android application, using MIT AppInventor, which is a general knowledge trivia app. The app should utilise programming concepts covered in class from Weeks 2 – 10, including persistence of data using files and databases, the dictionary data structure, web and networking functionality, and sorting algorithms.

The application should contain several screens to fulfill the requirements described below. You are free to design the interfaces of your app as you like, but your solution should also meet the requirements in a logical way.

Specifically, the logic requirements that must be supported in the app are as follows:

  • When the application is first opened, there should be a screen that provides users with a way to select the game difficulty (“easy”, “medium”, or “hard”) and start a new game and view high
  • There should be a separate screen in which the trivia questions are displayed, opened from the first screen. When this trivia screen opens, it should load questions of the selected difficulty, following the following logic:
  • If the device is currently connected to the network, questions should be loaded from the Open Trivia Database API, as described in the API section of this
  • If the device is not connected to the network, questions should be loaded from the provided text files, which contain static question data retrieved from the Open Trivia Database
  • A single question should be displayed at a time, including its category, question text, and four possible answers (including the correct answer and three incorrect answers in a random order). The user should be able to select one of these answers, at which point the following should occur:
  • If the selected answer is the correct answer, the user’s score is incremented by 1 point (the current score should also be visible on the trivia screen). The user should then be prompted as to whether they wish to continue the game or end it. If they choose to continue, a new question is displayed and the process
  • If the selected answer is incorrect, the user should be made aware that they selected the wrong answer, and the correct answer should be shown. The app should then navigate to another screen where the user can save their score to a database, passing the achieved score with
  • The save score screen should have a mechanism for the user to enter their name, which along with their score and a current date and timestamp, should be saved to a database. Once the value is saved, the app should navigate back to the main
  • There should be a separate screen on which users can view the high scores by loading them from the database and displaying in an appropriate UI component. The following additional functionality should exist on this screen:
  • There should be a way for the user to sort the scores, based on your implementation of a sorting algorithm. The scores can be sorted by the score value, alphabetical order of the user’s name, or the date timestamp – you only need to support one of
  • The user should also be able to delete a score, which will remove it from the display and the database

Downloading trivia questions from the Open Trivia Database using the API

The Open Trivia Database API should be used to download the trivia questions used in this app (when a network connection is available). You can get a random list of questions of a particular difficulty in JSON format using the following URL – all you need to do is replace <#> with a positive integer, and

with the preferred difficulty (“easy”, “medium”, or “hard”) as required:

https://opentdb.com/api.php?amount=<#>&difficulty=&type=multiple&encode=url3986

For example, https://opentdb.com/api.php?amount=20&difficulty=hard&type=multiple&encode=url3986 will give 20 random questions of hard difficulty. Note that the type parameter is set to “multiple”, so that multiple-choice questions are returned. The encode parameter specifies how special characters are rendered in text, in this case it is set to URL Encoding (RFC 3986).

In order to correctly display any of the text in your app, you’ll need to use the [.UriDecode] block (as shown below), which can be accessed from any Web type block you add to your app. For example, the RFC 3986 text that is displayed in the example image below would be decoded to “What country is not a part of Scandinavia?

It is recommended that you visit the Open Trivia DB API link in a browser and view the JSON in a web browser to get a feel for its structure. You will see that the JSON data contains an array (results) of questions, with each question containing a range of information that describes the question, its category, correct_answer, and incorrect_answers. Your app should extract this data and load into an appropriate data structure to achieve the required functionality for this assignment.

General Requirements for Coding

While your app should meet the functionality described above, you need to ensure that you demonstrate the concepts we have covered in ITECH2000 so far. To achieve full marks, you will need to ensure that you have correctly made use of each of the following components, constructs or concepts somewhere in your app:

  • Dictionary
  • WebViewer and/or Web component
  • ListView or ListPicker
  • TinyDB and File
  • Local and global variables
  • Procedures

You should follow best practices for coding that we have described this semester, including the use of procedures to promote code reuse. Make sure you thoroughly test your application to ensure that it is robust.

Please read through all of the requirements before you commence work on the app, so you get a full sense of what is required to be done. It is recommended that you first model any events using pseudocode before commencing programming.

2.Brief Report

As well as completing the program described above in AppInventor, you are also required to submit a brief report that includes the following:

  • A title page that includes your name and student ID
  • Pseudocode describing the behaviour of two (2) events that your app will respond to. Ensure that you clearly label your pseudocode so that it is clear what aspect you are
  • For each of the design components/blocks listed in the previous section (General Requirements for Coding), you should describe in 2-3 sentences how you used the component(s) in your solution and justify If you have used a component multiple times, please describe one example. Note: There are 6 in total.
  • A description of how you tested your application to ensure that it functioned correctly, with respect to user inputs, outputs, and
  • Uploaded By : Katthy Wills
  • Posted on : October 18th, 2022
  • Downloads : 2
  • Views : 138

Download Solution Now

Can't find what you're looking for?

Whatsapp Tap to ChatGet instant assistance

Choose a Plan

Premium

80 USD
  • All in Gold, plus:
  • 30-minute live one-to-one session with an expert
    • Understanding Marking Rubric
    • Understanding task requirements
    • Structuring & Formatting
    • Referencing & Citing
Most
Popular

Gold

30 50 USD
  • Get the Full Used Solution
    (Solution is already submitted and 100% plagiarised.
    Can only be used for reference purposes)
Save 33%

Silver

20 USD
  • Journals
  • Peer-Reviewed Articles
  • Books
  • Various other Data Sources – ProQuest, Informit, Scopus, Academic Search Complete, EBSCO, Exerpta Medica Database, and more