Challenge 2: A Singleton with object — Solution object Counter { var count: Int = 0 fun increment() { count += 1 } } fun main() { Counter.increment() Counter.increment() Counter.increment() println(Counter.count) } /* Output: 3 Notes: - Counter.increment() is called three times, each mutating the SAME shared count property, because "object Counter" guarantees there is only ever one instance of Counter in the whole program. - With a regular class, you'd need to either create exactly one instance yourself and pass that same reference everywhere it's needed (easy to get wrong), or hand-write a singleton pattern (private constructor + a static-style instance holder + manual thread-safety) — object gives you that guarantee for free, with no boilerplate. */