Created
April 9, 2018 18:54
-
-
Save yogeshmanghnani/9b69d2ffcf77617e32e0078e9edc684e to your computer and use it in GitHub Desktop.
This is a vehicle structure in Swift for demonstration of Conditional Conformances
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
struct Vehicele: Movable { | |
var wheels: Int | |
var doors: Int | |
var tankCapacity: Double | |
var isMoving = false | |
func move() { | |
isMoving = true | |
print("The car is moving") | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment