Created
April 26, 2016 22:29
-
-
Save tiarebalbi/e1e51b3d03b108c6a6811f51424fe112 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 Carro { | |
var modelo: String {get} | |
var fabricante: String {get} | |
} | |
class Gol : Carro { | |
var fabricante: String = "Volksvagem" | |
var modelo: String = "Gol" | |
internal var km: Int = 0 | |
func percorreu(km : Int) { | |
self.km += km | |
} | |
} | |
var meuGol = Gol() | |
meuGol.percorreu(200) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment