Starting from:
$30

$27

Assignment 1 Algorithm Animation & Multi-Threading

CSC 491/391 Mobile Application Development for iOS II
Programming Assignment 1
Algorithm Animation & Multi-Threading
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 12 and Swift 5.3 for this assignment.
• Include only your source 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
• Building an app that uses the dispatch queues for multi-threading.
• Following the best practices in memory management to ensure no cyclic strong
references.
Requirements
Develop an iOS app that animates various sorting algorithms. A
sample UI design is shown in Figure 1. The two views can
animate two different algorithms simultaneously using the same
data.
The specific requirements are:
1. Implement several common sorting algorithms to sort
an array of integers.
2. You should be able to select the algorithms and the size
of the array. The data in the array to be sorted are
randomly generated (shuffled) each time.
3. Animate the progress of the sorting algorithms by
displaying the state of the array being sorted in a fashion
similar to what is in the sample UI. Add small delays in
the algorithms so that the progress is observable at a
comfortable pace.
4. Use a dispatch queue to execute the sorting algorithms
on a thread other than the main thread.

You will need to create a custom view class to display and animate the state of the array being
sorted.
Documentation
It is mandatory to include a brief document that discusses
• The software design of your app, including diagrams of the key components (classes)
and their relations.
• The measure you took to avoid cyclic strong references in your code.
Figure    1 A    Sample    UI    Design
Possible bonus points for this assignment in one or more of the following areas:
• Exceptional quality in the design of your code, e.g., using suitable design patterns,
language features, etc. to achieve simplicity.
• Properly handle all possible scenarios that may arise during the execution of the app.
• Clean, well-organized, and easy to understand code.
Document the areas that exhibit these exceptional qualities in your app. 

More products