Challenge 3: Destructuring a Map — Solution data class Product(val name: String, val price: Double) fun main() { val item = Product("Keyboard", 49.99) val (name, price) = item println("$name costs $price") val catalog = mapOf( "Keyboard" to 49.99, "Mouse" to 19.99, "Monitor" to 179.99 ) for ((productName, productPrice) in catalog) { println("$productName: $productPrice") } } /* Output: Keyboard costs 49.99 Keyboard: 49.99 Mouse: 19.99 Monitor: 179.99 Notes: - val (name, price) = item destructures the Product data class using its auto-generated component1()/component2() functions, mapped to the constructor's property order (name, then price). - The for ((productName, productPrice) in catalog) loop destructures each Map.Entry the same way — the variable names on the left don't need to match the Map's own key/value naming, only the position does. */