load / Programlling%20ASSIgnment%202.pdf Submitasingeaptilethatcontains thecontents orthe noiect folder To zip your project folder: Ctrl-click your project folder and select "Compress..." from the context menu. o 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 mst use a unique prefix for the project name. (l suggest you use your last name and first initial as your prefix.) Please use the same prefix for all your assignments. 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. o 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 satis o A fundamental concept was not understood. o Code is sloppy and hard to read (eg, 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 Goals . Explore the Swift programming language . Write a simple function and a class in Swift Esperiment with Playground Assignments 1. Create a new Playground. Include all the code of this assignment in a single Playground. Compress the Playground to a zipped archive file. Submit the zip file in D2L 2. Write a function in Swift that performs the following tasks Function rank performs a binary search of a key in a sorted integer array. If the key appears in the array, the rank function returns the index of key in the array. If the key does not appear in the array, the rank function returns-1. (A Java implementation of the rank function can be found in Algorithm, 4 ed. by R. Sedgewick and K. Wayne, the textbook of the data structures course.) a. b. Create a sorted integer array to test the rank function. Make several calls o the rank function. Verify that the results are correct. 3. Write a more complete version of the Fraction class we have discussed in the lecture. Start from scratch and type in all the code yourself. (You will learn more from the mistakes you make along the way) a. Add methods to the Fraction class, version 4 (Program 6.6 in the playground Swit Part 01 - The Basio) to compute the subtraction, multiplication, and division of two fractions in a similar way to the add method (for the formulae to compute the subtraction, muliplication, and division of two fractions, see r). Each method should take another fraction object as the parameter and retum the result as a new Fraction object. The resulting fraction should not have common factors in its http://en.wiki numerator and denominator. b. Write test code to test each of the new methods of the class with different input values. Verify that your results are correct