During the program design process, the program describes the algorithm (command sequence) for manipulating data in pairs ). This is correct, but it is not always the most effective. Modern programs are often designed using the Object Oriented Programming (OOP) method. In Oop, a program is considered as a collection of interactive objects. Taking a Simulated Program as an example, you can easily understand this method. For example, if the program is to simulate highway overpasses, the objects may include cars and lanes. Each object uses its own algorithm to describe its behavior under different circumstances. During OOP programming, You need to design the object and the algorithm used. The OOP framework is used for programming. Therefore, "algorithm design" should be replaced with "design object and algorithm ".
Oop features encapsulation, inheritance, and polymorphism. Encapsulation is usually described as a form of information hiding (or abstraction. Although there is no problem, it is easier to understand this statement: encapsulation is a simplified form of "Object Description. Inheritance involves writing reusable code. Polymorphism means that a name has multiple meanings in the inherited context. Although it briefly describes Oop, it must be acknowledged that it is of little significance for readers who have never heard of OOP. But don't worry. All these terms will be explained in detail later in this book. C ++ provides a class to adapt to Oop-style programming. Class is a data type that integrates data and algorithms.
This article is from the "Object-Oriented Programming" blog, please be sure to keep this source http://lgy080600.blog.51cto.com/9168424/1439449