Classes and structures (also known as structs) are files that contain properties and methods. You use these properties and methods to add functionality. You have been working with structs since Chapter 1, Getting Familiar with Xcode. Strings, Ints, Bools, Arrays, Dictionaries, and Sets are all structs.
Earlier in the book, we created functions. As noted in Chapter 6, Starting the UI Setup, a method is a function that lives inside a class or struct.
Classes and structs are very similar; however, Swift handles each of them a bit differently. To get a better understanding of how classes and structs work, we create a new Playground project. Working in the Playground gives us the ability to learn how to create custom classes and structs and to gain an understanding of each of their positives and negatives.
Since we already have a project created, we can actually...