Last active
August 11, 2017 09:00
-
-
Save mayooresan/f42a4b3590f7b37acf52b5c75ee49ccb to your computer and use it in GitHub Desktop.
This file contains 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
protocol WarCapable { | |
var topSpeed : Double {get set} | |
var shotsPerMinute : Int {get set} | |
} | |
protocol SpyCapable { | |
var numberOfCameras : Int {get set} | |
} | |
class WarTank : WarCapable { | |
var topSpeed: Double = 100.0 | |
var shotsPerMinute: Int = 5 | |
} | |
class SpyJeep : WarCapable, SpyCapable{ | |
var topSpeed: Double = 200 | |
var shotsPerMinute: Int = 1 | |
var numberOfCameras: Int = 5 | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment