Problem (100 points)
Due Date: 02/28/2019 (11:59 PM)
CIS 444 – Mobile Application Programming Assignment #3
Develop an iOS application (called myQuiz) that displays three arithmetic expressions (using UILabels), allows the user to enter answers to the three expressions (using UITextFields), and displays (using a UILabel) how many answers were correctly entered when the user presses a “Submit” button. A “Next” button would allow the user to play subsequent rounds with new arithmetic expressions.
Note the following details:
1. The three arithmetic expressions displayed in every round would consist of two randomly generated integers in the interval [0, 10] and an operator (which can be “+”, “-”, or “x”), with the first being an addition expression, the second being a subtraction expression, and the third being a multiplication expression.
2. For the three UITextFields using which the user would enter the answers, the following should hold:
i. The placeholder “?” should be displayed when the user has no answer entered in a text field.
ii. The keyboard should be of type “Numbers and Punctuation”.
iii. The keyboard should retract when the user taps the background.
iv. The user should not be able to enter “0” as the first digit of his/her response unless the
correct answer is 0 (Hint: refer to the UITextFieldDelegate Protocol).
3. When the user presses the “Submit” button, the following should occur:
i. A UILabel should display how many answers were correctly entered. Note, this UILabel
should display any text only after the user presses the “Submit” button (and should disappear when the user presses the “Next” button). The appearance/disappearance of this UILabel should not, however, change the layout of the application.
ii. The user should not be able to edit the answers in any of the three text fields (until, of course, the user proceeds to the next round).
Hint: The textFieldShouldBeginEditing(_:) delegate protocol can be used.
4. Pressing the “Next” button would display three new expressions (one addition, one subtraction, and one multiplication), have the text fields display their placeholders (“?”), and make the UILabel that displays how many answers were correctly entered disappear.
5. Use Auto layout so that your application adapts to different screen sizes. The auto layout of your application will be tested on iPhone6s and iPhone6s Plus. Also, give your application suitable colors (for the background view, texts etc.) and select suitable text sizes.
Note, a framework of the view controller class (QuizViewController.swift) has been uploaded to Blackboard (which provides various data types to be used etc.). Build on this view controller definition. Sample Screenshots
Deliverables
1) Log onto Blackboard. 2) Click on Assignment 3.
• Record your screen to show your code, storyboard, icon (if you did), and running app (show both orientations and two devices)
• Submit video and zipped project folder containing the files of myQuiz using Blackboard as follows.
3) Browse and upload the desired file from your computer into Blackboard. 4) Submit the assignment.