CSCI 448 - Mobile Application Development

Spring 2022 - Assignment 2 - Quizster

This assignment is due by March 02, 2022 by 11:59pm.

For this assignment, you will take your completed Lab3A (feel free to start from Lab3B to have extra features!) and allow for multiple question types. Currently, we can only ask the user a True or False (Yes/No, A or B) question. It would be much better if we could prompt the user with more options or even better yet - have the user provide their own answer. You will need to make changes to the entire MVC stack to accomplish this task.

When you create this project, set the package to include <userName_A2> and name the app <userName>_A2 where userName is your name (for instance, mine would be jpaone_A2).

An example of the completed app is shown below:


Part I - Model: Create a Multiple Choice Question


First, add a way for your app to store Questions that have four answer choices and which is the correct answer. We are only concerned with the Model side of the Multiple Choice Question at this point. Add a question of this type to your question array.


Part II - Model: Create a Fill-in-the-Blank Question


Next, add a way for your app to store Questions that have a free response (one word) answer and what the correct answer is. When we check the correct answer, we will not worry about the letter case. Again, we are only concerned with the Model. Add a question of this type to your question array.


Part III - View: Display Each Question Type


Update your Question layout so that each question type can be handled. We'll need two buttons for True/False questions, four buttons for Multiple Choice questions, and an EditText + button for Fill-in-the-Blank questions.

There are many ways to accomplish this task, either with a single layout or with multiple layouts.


Part IV - Controller Updates The Questions


Now we'll start to see the changes. When the user presses the Next or Previous button, in addition to advancing the question data we also need to update the view to display the layout that matches the question type.

When a user enters an answer, be sure to validate their response and display the appropriate Toast.


Part V - Model View Controller: Limit To One Answer


Finally, you will need to make changes to all of the MVC components to accomplish this task. Enforce that a user can only answer a question one time. This has two pieces to it. If the user initially answers a question wrong, then they cannot choose the correct answer to receive the point. Furthermore, if they initially answer the question correctly, then they cannot answer again to receive additional points. The user only has one chance to answer the question. Make sure all loop holes due to rotation or other changes are closed (see Lab3B for information on loop holes).


Part XC - Extra Credit


There are two extensions you can do for extra credit:

  1. First, create a nice landscape layout for your app. This may be most applicable for your multiple choice question, but all your question types should have a different layout for each orientation.
  2. Second, add in the Cheat Fragment and be sure to close all loopholes so once a user cheats they can never score the question. Additionally, give the user a limited number of cheats to use - 3. If they have cheated 3 times, then they can no longer go to the Cheat Activity. Be sure any loop holes with this value is closed as well.

Part VI - Exit Interview


Be sure to include a README.txt file containing any comments, notes to run, etc. In addition, answer the following questions in your README.txt:

  1. How did you structure your classes to allow for multiple question types in your question array?
  2. How did your choice for Question #1 affect how you set up your ViewModel, View, and Controller?
  3. What difficulties did you have with the Controller passing information from the Model to the View?
  4. What was the role of the ViewModel?

Grading Rubric


Your submission will be graded according to the following rubric.

Percentage Requirement Description
20% Multiple Choice & Fill-in-the-Blank Question types properly created. Question array contains questions of all three types.
15% Layouts made for each question type.
15% Pressing "Next" and "Previous" button displays the next question text and corresponding choices.
25% User has one chance to answer each question. All loop holes are closed.
10% App functions as expected (answering correctly awards a point, user can cycle through questions, etc.) and structured correctly (Activity, ViewModel, etc.).
5% Exit Interview questions from Part V are answered and included in README.txt file.
5% Submission includes source code, Android Studio project, and README.txt.
5% Submission compiles and executes without error.
+2% Landscape layout included for all question types.
+3% User has three cheats to use with all loopholes closed.

Submission


Please ensure your project produces an app with the name userName_A2. When you are completed with the assignment zip together your full source code (the Android Studio project), and README.txt. Name the zip file, userName_A2.zip. Upload this file to Canvas under A2.

This assignment is due by March 02, 2022 by 11:59pm.