Swift Experts Only

profileehmagrzm7i

I need the code to add to a swift class file. The instructions are below and I need it in 24 hours.

 

Add a SWIFT class file to the project that illustrates and contains the following:

  • The class name is 'Calculator'
  • Has public variables of the type float called numerator, denominator and total.
  • Has a method called 'Add' that returns the sum of numerator and denominator and sets the total variable.
  • Has a method called 'Divide that returns the division of the numerator and denominator and sets the total.
  • The 'Divide' method should contains a 'try/catch' to ensure that dividing by zero is addressed.

 

    • 10 years ago
    • 15
    Answer(1)

    Purchase the answer to view it

    blurred-text
    NOT RATED
    • attachment
      calcal.txt
    • attachment
      hello.txt
    • attachment
      imageload.txt
    Bids(0)