Technical requirements
The Xcode playground for this chapter is in the Chapter08
folder of the code bundle for this book, which can be downloaded here:
Check out the following video to see the code in action:
https://bit.ly/3eWTzOC
If you wish to start from scratch, create a new playground and name it
Protocols,ExtensionsAndErrorHandling
. You can type in and run all of the code in this chapter as you go along. Let’s start with protocols, which is a way of specifying properties and methods that a class, structure, or enumeration should have.