官术网_书友最值得收藏!

Summary

In this chapter, 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. You understood that the classes represent blueprints or templates to generate the objects, 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. We generated many versions of the initial UML diagram as we added superclasses and subclasses. Finally, we wrote some code in the Swift Playground to understand how we can interact with API objects.

Now that you have learned some of the basics of the object-oriented paradigm, we are ready to start creating classes and instances in Swift, which is the topic of the next chapter.

主站蜘蛛池模板: 北京市| 万荣县| 札达县| 翁源县| 麻栗坡县| 阳新县| 台南市| 抚顺市| 正安县| 江口县| 仁怀市| 永定县| 长汀县| 元氏县| 凉山| 秦安县| 弥勒县| 阿城市| 汝州市| 长海县| 安岳县| 于都县| 军事| 重庆市| 济宁市| 大厂| 巴青县| 安陆市| 海安县| 平利县| 云和县| 澳门| 通海县| 巴青县| 通榆县| 贵溪市| 湖口县| 吴旗县| 弥渡县| 和静县| 台东县|