Adding requirements to protocols 

Empty protocols can be useful as we've seen previously, but protocols are meant to provide requirements.

Protocols can require different aspects of objects:

protocol DemoProtocol {
var aRequiredProperty: String { get set }
var aReadonlyProperty: Double { get }
static var aStaticProperty: Int { get set }

init(requiredProperty: String)

func doSomething() -> Bool
}

The previous DemoProtocol protocol exposes all of the requirements a conforming class should provide:

You can implement this protocol with a class or a structure or even an enumeration.