Complete the code to prevent the method from being overridden.
class Vehicle { [1] func startEngine() { print("Engine started") } }
Complete the code to prevent the class from being subclassed.
[1] class Animal { func sound() { print("Some sound") } }
Fix the error in the subclass trying to override a final method.
class Car { final func drive() { print("Driving") } } class SportsCar: Car { [1] func drive() { print("Fast driving") } }
Fill both blanks to prevent subclassing and method overriding.
[1] class Bird { [2] func fly() { print("Flying") } }
Fill all three blanks to create a final class with a final method and a non-final method.
[1] class Plane { [2] func takeOff() { print("Taking off") } [3] func land() { print("Landing") } }
