Swift - Write program to Create a subclass of Vehicle named Bicycle

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 Bicycle

Hint

class Bicycle: Vehicle {
     override init() {
         super.init()
         wheels = 2
         doors = 0
     }
}

Related Exercise