Challenge 3: copy() and a Companion Object — Solution data class Book(val title: String, val author: String, val year: Int) { companion object { fun unknown() = Book("Unknown", "Unknown", 0) } } fun main() { val firstEdition = Book("Kotlin in Action", "Dmitry Jemerov", 2017) val secondEdition = firstEdition.copy(year = 2021) println(firstEdition) println(secondEdition) val placeholder = Book.unknown() println(placeholder) } /* Output: Book(title=Kotlin in Action, author=Dmitry Jemerov, year=2017) Book(title=Kotlin in Action, author=Dmitry Jemerov, year=2021) Book(title=Unknown, author=Unknown, year=0) Notes: - copy(year = 2021) creates a brand-new Book with the same title and author as firstEdition, but a different year — firstEdition itself is never mutated (all its properties are val). - Book.unknown() is called directly on the class, exactly like a Java static method, but it's implemented as a real function inside the class's companion object. */