Question: class Vehicle(var brand: String, var model: String, var year: Int) fun main() { val v1 = Vehicle(Ford, Mustang, 1969) // Call the function v1.drive() }
class Vehicle(var brand: String, var model: String, var year: Int) fun main() { val v1 = Vehicle("Ford", "Mustang", 1969) // Call the function v1.drive() }
in the following, the main function is calling the drive() function. Implement the drive() function that displays the "Wroooom" message
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
