Scala, Design Patterns, Programming, Builder Pattern, Coding.
extends App { val book: Book = new BookBuilder() .setTitle("The Hobbit") .setAuthor("J.R.R. Tolkien") .setPrice(10.5) .build() System.out.println(s"The book ${book.getTitle()} written by ${book.getAuthor()} got a price of ${book.getPrice()} euros") } The BookBuilder has default values for its