Created
June 4, 2017 01:40
-
-
Save chriswebb09/dad54e578eeb693a5c16e8fc8b39bf29 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
protocol Calculable { | |
func addition(intOne: Int, intTwo: Int) -> Int | |
func subtraction(intOne: Int, intTwo: Int) -> Int | |
func division(int: Int, by: Int) -> Int | |
} | |
class Math: Calculable { | |
func addition(intOne: Int, intTwo: Int) -> Int { | |
return intOne + intTwo | |
} | |
func subtraction(intOne: Int, intTwo: Int) -> Int { | |
return intOne - intTwo | |
} | |
func division(int: Int, by: Int) -> Int { | |
return int / by | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment