Challenge 1: A Class with an Init Block — Solution class BankAccount(val owner: String, var balance: Double) { init { require(balance >= 0) { "Starting balance cannot be negative" } } fun deposit(amount: Double) { balance += amount } } fun main() { val account = BankAccount("Philip", 100.0) account.deposit(50.0) account.deposit(25.0) println("${account.owner}'s balance: ${account.balance}") } /* Output: Philip's balance: 175.0 Notes: - The init block runs once, at construction time, and uses require() to throw an IllegalArgumentException immediately if balance starts negative (e.g. BankAccount("Philip", -10.0) would crash right there). - deposit() mutates the var property balance directly via +=, since balance was declared as var in the primary constructor. - Two deposits (50.0, then 25.0) bring the balance from 100.0 to 175.0. */