Putting together all the pieces of the object-oriented puzzle
In Chapter 1, Objects from the Real-World to the Playground, you learned how to recognize objects from real-life situations. We understood that working with objects makes it easier to write code that is easier to understand and reuse. You learned how to recognize real-world elements and translate them into the different components of the object-oriented paradigm supported in Swift: classes, protocols, properties, methods, and instances.
We discussed that classes represent blueprints or templates to generate the objects, which are also known as instances. We designed a few classes with properties and methods that represent blueprints for real-life objects. Then, we improved the initial design by taking advantage of the power of abstraction and specialized different classes. In Chapter 2, Structures, Classes, and Instances, you learned about an object's life cycle. We worked with many examples to understand how object initializers...