Here is an example:
Original Grade:
class Person {
func walk() {
}
}
Your subclass:
class Runner: Person {
override func walk() {
}
}
The class Runnerexists overridewith a function walk. This is because it is a subclass Person, and it can override the Human function. So, if you create an instance Runner:
var usainBolt = Runner()
walk:
usainBolt.walk()
, Runner. , walk, Person.