Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Create the following in swift: Hurricane Strength Create a function called hurricaneRating that accepts a float that represents the wind speed. The function should return
Create the following in swift:
Hurricane Strength Create a function called hurricaneRating that accepts a float that represents the wind speed. The function should return a string message. Use a Switch statement with inclusive ranges that match the followin 1. g: 74-95 is a category one hurricane 96-110 is a category two . . 111 130 is a category three 131-155 is a category four 155 and above is a category five if none of these is a match the message should indicate that there is no such category . Create a function called findSmallestAmount that uses a Variadic Parameter called amounts which can accept any number of dollar amounts. Within the function, determine and return the smallest amount as a Double. When you call the function, format the output as currency with the ability to be localized to another locale if desired. 2. 3. Create a function called findLargestAmount that uses a Variadic Parameter called amounts which can accept any number of dollar amounts, Within the function, determine and return the largest amount as a Double. When you call the function, format the output as currency with the ability to be localized to another locale if desired. Create a withdraw function that will accept a Double amount and a tuple called account that is comprised of two values (name which is a string and balance which is a double). This function should subtract the amount from the balance and Return a tuple comprised of the account name and the new balance calculated. Print a friendly message displaying the name and the balance formatted to currency, Create a deposit function that will accept a Double amount and a tuple called account that is comprised of two values (name which is a string and balance which is a double). This function should add the amount to the balance and Return a tuple comprised of the account name and the new balance calculated. Print a friendly message displaying the name and the balance formatted to currency. 4. 5Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started