Question: Could anyone please help with some Swift programming questions? Question 5 Protocols cannot require specific initializers to be implemented by conforming types. True False Question
Could anyone please help with some Swift programming questions?
Question 5
Protocols cannot require specific initializers to be implemented by conforming types.
| True |
| False |
Question 6
Protocols are types. You can use a protocol in many places where types are allowed.
| True |
| False |
Question 7
Delegation is a design pattern that enables a class or structure to hand off (or delegate) some of its responsibilities to an instance of another type.
| True |
| False |
Question 8
RestaurantsViewController is a class that has a superclass called UIViewController. RestaurantsViewController also adopts the protocols UITableViewDataSource and UITableViewDelegate. Which of the following is the correct way to declare the RestaurantsViewController class?
| class RestaurantsViewController { } |
| class RestaurantsViewController : UITableViewDataSource, UITableViewDelegate { } |
| class RestaurantsViewController : UIViewController |
| class RestaurantsViewController : UIViewController, UITableViewDataSource, UITableViewDelegate { } |
| class RestaurantsViewController : UIViewController : UITableViewDataSource, UITableViewDelegate { } |
| class RestaurantsViewController extends UIViewController implements UITableViewDataSource, UITableViewDelegate { } |
Question 9
A protocol cannot inherit from other protocols.
| True |
| False |
Question 10
The _________________ operator returns true if an instance conforms to a protocol and returns false if it does not. (See Checking for Protocol Conformance in The Swift Programming Language.)
| as |
| conforms |
| is |
| has |
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
