Swift - Write program to Create a subclass of Vehicle

Requirements

Given the following class

enum Color: String {
       case Red = "Red"
       case Blue = "Blue"
       case White = "white"
}

class Vehicle {
       var model: String
       var doors: Int
       var color: Color
       var wheels: Int

       init() {
         model = ""
         doors = 0
         color = Color.White
         wheels = 0
     }
}

Write program to Create a subclass of Vehicle named MotorVehicle . Add an additional property to it named licensePlate.

class MotorVehicle: Vehicle {
     var licensePlate: String

     override init() {
         licensePlate = "NOT ASSIGNED"
         super.init()
     }
}

Related Exercise