Created
January 28, 2016 03:27
-
-
Save geykel/0c20954211fec1ff2855 to your computer and use it in GitHub Desktop.
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
// 1 | |
protocol Hablar { | |
func decirHola(nombre: String) | |
} | |
// 2 | |
class Persona: Hablar { | |
// 3 | |
func decirHola(nombre: String) { | |
// 4 | |
print("Hola (nombre).") | |
} | |
} | |
// 5 | |
var juliana = Persona() | |
var geykel = Persona() | |
// 6 | |
juliana.decirHola("Geykel") | |
geykel.decirHola("Juliana") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment