Created
March 24, 2019 21:57
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
import scala.concurrent.Future | |
case class Department(id: String, name: String, employeeIds: List[String]) | |
case class Employee(id: String, name: String) | |
case class DepartmentWithEmployees(departmentId: String, departmentName: String, employees: List[Employee]) | |
object DepartmentService { | |
def getDepartment(id: String): Future[Option[Department]] = ??? | |
} | |
object EmployeeService { | |
def getEmployee(id: String): Future[Option[Employee]] = ??? | |
} | |
object DepartmentWithEmployeesService { | |
def getDepartmentWithEmployees(departmentId: String): Future[Option[DepartmentWithEmployees]] = { | |
// Implement this functionality using the above given functions | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment