Swift Development for iOS – Swift Part 2 Homework 1 – Cooking Recipes

 

Task 1
Cooking Recipes

You are making an application for cooking recipes.
In your application you must have at least 3 recipes for different dishes.
You must have all the products for cooking in an enum. (e.g. enum Products with items – sugar, salt, pepper, banana etc.) . Do not forget that the recipes are sometimes consisting of few items with different amount of them (e.g. sugar – 100 gr, banana 2 pcs.). Create a function used for search of an item, and if the item is found the recipe must be printed.

Task 2
What I should buy ?

Consider the data from task 1. You must extend the application with functionality to have information about the product availability at your home. Make a function that checks if you have all the needed items in order to cook a dish. If no, make a function to print information about what products must be bought and how many (how much).

(more…)

Read More