Created
February 19, 2017 19:54
-
-
Save vvviiimmm/52e43b5290753b624ef41ff2ea880d2b 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
| trait Shape { | |
| def area: Double | |
| def info: String | |
| } | |
| class Circle(radius: Double) extends Shape { | |
| override def area: Double = math.Pi * math.pow(radius, 2) | |
| override def info: String = s"Hi, I'm a circle with radius $radius" | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment