Guest User

Untitled

a guest
Jan 24th, 2018
150
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Scala 0.34 KB | None | 0 0
  1. object Haller extends Student with Person with Sex {
  2.   val name = "Olaf Haller"
  3.   var addr = ""
  4.   val matr = 123456
  5.   val male = true
  6.  
  7.   import util._
  8.   def inLecture = Random.nextBoolean
  9.  
  10.   override def toString = "Haller(" + name + (if(male) ", m" else ", w") + ", " + matr + ", Studiert" + (if(inLecture) ")" else " nicht)")
  11. }
Add Comment
Please, Sign In to add comment