Instantly share code, notes, and snippets.

Embed
What would you like to do?
init-class-subclass-designatedinit
class Male: Person {
let gender = "M"
var hairLength: String
init(hairLength: String, name: String, height: String, weight: String) {
self.hairLength = hairLength
print(self.hairLength)
super.init(name: name, height: height, weight: weight)
print(self.name)
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment