Scala, Design Patterns, Programming, Builder Pattern, Coding.
setTitle(title: String): BookBuilder = { this.title = title this } def setAuthor(author: String): BookBuilder = { this.author = author this } def setPrice(price: Double): BookBuilder = { this.price = price this } def build(): Book = new Book(this.title, this.author, this.price) } object Test