What is the correct way of creating a child class?
-
class Headphones() : Gadget(price: Int, brand: String) -
class Headphones(price: Int, brand: String, type: String) : Gadget(price: Int, brand: String) -
class Headphones(price: Int, brand: String, val type: String) : Gadget(price, brand) -
class Headphones(price, brand, val type: String) : Gadget(price, brand)