Skip to content

Instantly share code, notes, and snippets.

Created Oct 13, 2015
What would you like to do?
abstract class Employee {
def salary: Int
trait InOffice {
def desk: String
trait Remote {
def location: String
def timeZone: String
trait Temporary {
def startDate: Int
def stay: Int
def endDate(): Int = (startDate + stay) % 12
trait Authority {
def directReports: Array[Employee]
def hasDirectReports() :Boolean = directReports.length != 0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment