Created
April 11, 2018 17:01
-
-
Save harmeetsingh0013/3ebb35efc675dcd7b4aa15ea82540c86 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
case class Money(dollars: Int, cents: Int) | |
trait Data { | |
val balance = Money(102, 44) | |
val salary = Money(320, 0) | |
val balances: Map[String, Money] = Map( | |
"James" -> Money(212, 98), | |
"Jimmy" -> Money(43, 44) | |
) | |
val salaries: Map[String, Money] = Map( | |
"James" -> Money(500, 98), | |
"Jimmy" -> Money(500, 44) | |
) | |
val marbles: Map[String, Int] = Map( | |
"James" -> 4, | |
"Jimmy" -> 5 | |
) | |
val won: Map[String, Int] = Map( | |
"James" -> 2, | |
"Jimmy" -> 1 | |
) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment