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

  • Expert C++
  • Vardan Grigoryan Shunguang Wu
  • 271字
  • 2021-06-24 16:33:59

Details of Object-Oriented Programming

The difficulty of designing, implementing, and maintaining a software project arises with respect to the complexity of the project. A simple calculator could be written using the procedural approach (that is, the procedural programming paradigm), while a bank account management system would be too complex to implement using the same approach.

C++ supports Object-Oriented programming (OOP), a paradigm that is built upon dissecting entities into objects that exist in a web of close intercommunication. Imagine a simple scenario in the real world when you take the remote to change the TV channel. At least three different objects take part in this action: the remote, the TV, and, most importantly, you. To express the real-world objects and their relationship using a programming language, we aren't forced to use classes, class inheritance, abstract classes, interfaces, virtual functions, and so on. The mentioned features and concepts make the process of designing and coding a lot easier as they allow us to express and share ideas in an elegant manner, but they are not mandatory. As the creator of C++, Bjarne Stroustrup, says, "Not every program should be object-oriented." To understand high-level concepts and features of the OOP paradigm, we will try to look behind the scenes. Throughout this book, we will dive into the design of object-oriented programs. Understanding the essence of objects and their relationship, and then using them to design object-oriented programs, is one of the goals of this book.

In this chapter, we'll learn about the following topics in detail:

  • Introduction to OOP
  • The C++ object model
  • Class relationships, including inheritance
  • Polymorphism
  • Useful design patterns
主站蜘蛛池模板: 且末县| 新营市| 固安县| 新沂市| 惠来县| 康马县| 新竹市| 长治市| 新蔡县| 广饶县| 屏南县| 正镶白旗| 南汇区| 阜康市| 微山县| 明光市| 新沂市| 深州市| 南投市| 漳平市| 深水埗区| 湟源县| 福安市| 祁阳县| 民和| 盐津县| 虎林市| 松潘县| 武乡县| 延吉市| 灵武市| 南平市| 富源县| 晋江市| 岳池县| 望都县| 南康市| 新津县| 定兴县| 台东市| 湟源县|