Created
November 23, 2018 21:34
-
-
Save jaiversin/4e822b80a5d87750e2e835ae81f58cb2 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
class Persona { | |
let nombre: String | |
var carro: Carro? | |
init(nombre: String) { | |
self.nombre = nombre | |
} | |
} | |
class Carro { | |
let marca: String | |
var propietario: Persona? | |
init(marca: String) { | |
self.marca = marca | |
} | |
} | |
let jhon = Persona(nombre: "Jhon") | |
let transporte = Carro(marca: "BMW") | |
jhon.carro = transporte | |
transporte.propietario = jhon |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment