Created
December 4, 2020 14:50
-
-
Save matiasdim/6e3ee8086b1103dde64c8ed1671d1490 to your computer and use it in GitHub Desktop.
This file contains 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
class Rectangle { | |
var width: Int | |
var height: Int | |
init(width: Int, height: Int) { | |
self.width = width | |
self.height = height | |
} | |
} | |
class AreaCalculator { | |
func area(rectangle: Rectangle) -> Int { | |
return rectangle.height * rectangle.width | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment