This section is an excerpt from the Treehouse classroom.
Instructions
You are being given a simple true/false quiz app. The app functions correctly, though much of the code could benefit from major refactoring. For instance, the app currently is based on collection types, which should be converted into custom classes or structs. Similarly, the app does not adhere to the Model-View-Controller design pattern as well as it could.
Additionally, you will need to add several of the features described below, some being mandatory, others optional. For a few of the features, you are being asked to step beyond what you have learned in this course and make use of documentation and outside resources. That said, provided you find the correct resources, you should be able to work through the implementation. Remember, just as important as practicing the specifics of the syntax you’ve learned is getting comfortable with the idea of venturing into the unknown to find and use the right tools for the job.
It is worth noting that while we have provided final question set and UI screenshots, we encourage you to choose a subject area that interests you (movies, music, sports, history, technology, etc…) and create your own question set and background imagery/UI to match. This is not a requirement for the project, but will almost certainly make it a more enjoyable experience and better portfolio piece.
Grading
To get a passing grade you'll need to submit a project that meets the following requirements. If your project receives a "Needs Work" rating on any of these tasks, then you'll need to edit your project and re-submit it until it "Meets" or "Exceeds" each task requirement.
Needs Work
Meets Expectations
Exceeds Expectations
Swift project successfully compiles and runs
• Swift project doesn’t compile or ends due to unhandled exceptions.
• Project compiles and runs without errors and is written in Swift.
N/A
Storyboard Enhancement
• Storyboard has not been updated to display elements correctly on all iPhone sizes (3,4,5,6,6+).
• Storyboard has been updated to display elements correctly on all iPhone sizes (3,4,5,6,6+).
N/A
Create custom structs or classes
• Individual questions are still modeled using Dictionaries.
• Individual questions have been modeled using a class or struct.
N/A
Refactor according to MVC
• Question data is still defined in ViewController.Swift
• Question data has been abstracted into its own class or struct and placed in a new Swift file.
N/A
Accommodating 4 answer choices
• App can not correctly display or evaluate 4-choice questions. Answer option buttons are not spaced or sized according to mock-ups.
• All provided questions display and evaluate correctly. All buttons match mock-ups provided.
N/A
Random, non-repeating questions
• A single game can exhibit repeated questions, or “brute-force” is being used to prevent repetition. Brute force would be string matching, etc...
• Random questions are generated without repetition.
N/A
Total number of OPTIONAL Features implemented
• Student did not successfully implement ANY of the OPTIONAL features, listed below.
• Student successfully implemented at least 1 of the OPTIONAL features listed below.
• Student successfully implemented at least 3 of the OPTIONAL features listed below.
OPTIONAL: Add two sound effects, one for correct answers and one for incorrect.
N/A
• Chose not to implement or did not implement sound effects successfully.
• Sound effects successfully implemented.
OPTIONAL: Lightning Mode
N/A
• Lightning mode was not implemented or implemented unsuccessfully.
• Lightning mode and countdown timer was successfully implemented.
OPTIONAL: Implement a way to appropriately display the correct answer, when a player answers incorrectly.
N/A
• Chose not to implement or did not successfully implement correct answer notification successfully.
• Successful implementation of correct answer display.
OPTIONAL: Mix of 3 and 4 choice questions
N/A
• Chose not to implement or did not successfully implement.
• Successfully displays a mix of 3 and 4 choice questions, while re-spacing UI elements.
OPTIONAL: Convert the text-based question system to one that dynamically generates arithmetic problems/solutions. For instance, make this a multiplication or addition quiz.
N/A
• Chose not to implement or did not successfully implement dynamic problem generation.
• Dynamically generated arithmetic questions was successfully implemented.