$35
CSC 471/371 Mobile Application Development for iOS
Programming Assignment 5: A Simple Shopping List App
Due Date & Submission
• Submit your assignment in D2L Dropbox.
• Submit a single zip file that contains the contents of the project folder
o To zip your project folder: Ctrl-click your project folder and select “Compress
…” from the context menu.
• It is mandatory to use Xcode 10 and Swift 4 for this assignment.
• Include only your source code files, including
o *.swift, *.plist, *.xib, *.storyboard
o image files
o project files (.xcodeproj)
o test folders
• You must use a unique prefix for the project name. (I suggest you use your last name
and first initial as your prefix.) Please use the same prefix for all your assignments.
o Note you only need to use the prefix for the project name. It is not necessary to
use the prefix on other files in your project.
• Do not include unused or unrelated files.
• Before you submit, build and run the project, make sure everything compiles and
works. Close your project before zipping the folder.
• Here are the most common reasons assignments are marked down:
o Project does not build.
o Project does not build without warnings.
o One or more items in the Requirements section were not satisfied.
o A fundamental concept was not understood.
o Code is sloppy and hard to read (e.g. indentation is not consistent, etc.).
o Your solution is difficult (or impossible) for someone reading the code to
understand due to lack of comments, poor variable/method names, poor
solution structure, etc.
• Bonus points.
o Bonus points may be awarded to projects with exceptional qualities in one or
more aspects.
o Bonus points will only be awarded after all the required elements have been
satisfied.
o Bonus points will not be awarded merely for extra amount of work (or code).
o Extra and sloppy code may cause your assignments to be marked down.
o Bonus points are awarded at the sole discretion of the instructor.
o Include a note in the comment in D2L describing the part(s) should be
considered for bonus points.
Goals
• Explore Xcode and build an app with text input fields
• Explore UIKit documentation
Assignments
1. Create a simple Shopping List app. The screens should be similar to the ones below. The
left is showing the initial screen, and the right is showing the screen of the app after 2
items have been added to the shopping list.
2. The New List button will create a new empty shopping list. The contents of the current
shopping list will be lost.
3. The New Item button will clear any content in the two text fields.
4. The text field next to Description allows you to type the description of an item to be
added to the shopping list. The action button on the soft keyword should dismiss the
keyboard.
5. The text field next to Quantity allows you to type the quantity of an item to be added to
the shopping list. It should use a numeric keypad to input the numbers. The keypad
should be dismissed with a tap in the background.
6. The Add button adds a new item to the shopping list based on the description and
quantity in the text fields. The contents of the shopping should be displayed in the
lower portion of the screen, one line per item, as shown in the screenshot above. The
items should be in the order in which they are entered.
7. You should use auto layout for this assignment.
8. You should check for any invalid input in the text fields, when the Add button is
tapped. You should ensure that neither input is empty, and the quantity field is an
integer. An alert popup should be displayed when invalid input is found, and no item
will be added when the input is invalid.
9. Always remember to follow all the conventions and write high quality, easy to read
code.
10. Make sure your program
a. builds without errors or warnings, and
b. runs without crashing