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

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 Java 9: classes, fields, 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 fields and methods that represent blueprints for real-life objects, specifically, 2D shapes. 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. We understood the application domain and we made changes to the original design as our knowledge increased and we realized we were able to generalize behavior.

Now that you have learned some of the basics of the object-oriented paradigm, we are ready to start creating classes and instances in Java 9 with JShell, which is what we are going to discuss in the next chapter. It is time to start object-oriented coding!

主站蜘蛛池模板: 瑞金市| 苗栗市| 淄博市| 子长县| 云林县| 眉山市| 宁阳县| 昌黎县| 明溪县| 泸水县| 绥阳县| 鹰潭市| 永春县| 宁河县| 宜兰市| 东丰县| 门头沟区| 原阳县| 梁山县| 临夏市| 荆州市| 巴马| 炎陵县| 阳高县| 台南县| 扎鲁特旗| 温泉县| 龙胜| 兴安盟| 盐津县| 嘉黎县| 桃江县| 宜宾市| 岚皋县| 封丘县| 灌南县| 玉门市| 贵阳市| 寿光市| 灵璧县| 正镶白旗|