Skip to content

Instantly share code, notes, and snippets.

@chriswebb09
Created June 4, 2017 01:40
Show Gist options
  • Save chriswebb09/dad54e578eeb693a5c16e8fc8b39bf29 to your computer and use it in GitHub Desktop.
Save chriswebb09/dad54e578eeb693a5c16e8fc8b39bf29 to your computer and use it in GitHub Desktop.
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