Test your knowledge

  1. When you use the static var keywords to declare a type property:
    1. You cannot override the type property in the subclasses.
    2. You can override the type property in the subclasses.
    3. You can override the type property only in the superclass.

  2. When you use the class var keywords to declare a type property:
    1. You cannot override the type property in the subclasses.
    2. You can override the type property in the subclasses.
    3. You can override the type property only in the superclass.

  3. When you use the final keyword to declare an instance method:
    1. You cannot override the instance method in the subclasses.
    2. You can override the instance method in the subclasses.
    3. You can override the instance method only once, that is, in just one subclass.

  4. Polymorphism means: ...

Get Swift 3 ObjectOriented Programming - Second Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.