Nick Walter Challenges (Part 6)
Next part - all linked to classes! We have inheritance and initialization - two areas I do need a clearer understanding. Let's go! Start time - 18:09 Inheritance - Subclassing class Animal { var name = "" var age = "" func sayHello() { print ( "Hello! I am an animal!" ) } } class Mammal: Animal { var hairColour = "" } let snake = Animal () let dog = Mammal () dog . hairColour = "brown" dog . hairColour class Monkey: Mammal { var thumbSize = 0 } let george = Monkey () george . thumbSize george . sayHello () Nothing new here to be honest but nice to recap! Overriding Use of the override keyword if you use the same name of the function from the super class but change its functionality in some way. Easy. Use of the super. option - thi...