Test your knowledge

  1. You use the static var keywords to declare a:
    1. Type property.
    2. Instance property.
    3. Read-only computed instance property.

  2. You use the static let keywords to declare a:
    1. Mutable type property.
    2. Immutable instance property.
    3. Immutable type property.

  3. An instance-stored property:
    1. Has its own independent value for each instance of a class.
    2. Has the same value for all the instances of a class.
    3. Has the same value for all the instances of a class, unless it is accessed through the class name followed by a dot and the property name.

  4. A class that exposes mutable properties will:
    1. Generate immutable instances.
    2. Generate mutable instances.
    3. Generate mutable classes but immutable instances.

  5. An instance method:
    1. Cannot access instance properties.
    2. Can access instance properties.
    3. Can access only type properties.

  6. Based on Swift API Design Guidelines, which is the most convenient name for a mutable or mutating instance method naturally described by the calculate verb?
    1. calculate.
    2. calculated.
    3. calculation.

  7. Based on Swift API Design Guidelines, which is the most convenient name for an immutable or nonmutating instance method naturally described by the calculate verb?
    1. calculate.
    2. calculated.
    3. calculation.

  8. By default, Swift 3:
    1. Externalizes the first parameter in methods and functions.
    2. Doesn't externalize the first parameter in methods and functions.
    3. Externalizes the first parameter in methods but doesn't externalize the first parameter in functions.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.191.239.178