Created
May 14, 2020 01:05
-
-
Save lu4nm3/71a318ded07e2b2d22ab608919488924 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 Restaurant { | |
def menu: String | |
} | |
case class Mexican() extends Restaurant { | |
def menu: String = "tacos" | |
} | |
case class Italian() extends Restaurant { | |
def menu: String = "spaghetti" | |
} | |
case class Chinese() extends Restaurant { | |
def menu: String = "chow mein" | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment