I have long wanted to have time to calm down and read Bruce Eckel's thinking in C ++ book. The book of the electronic version lie on the hard drive of my original host, when I graduated, I had no time to sweep her out, so I gave her a dowry. When I went to csdn today, I suddenly found that the familiar word appeared in my sight. I thought it was not busy during this time, so I took her down again, I hope that I can find a happy one out of my thoughts.
After decompression, I can't wait to read the first chapter-Introduction to objects. Here I review my understanding of class, objects, and OOP (object-oriented programming, it also inspired me to deepen my understanding of those concepts. Of course, it is impossible for us to understand the important concepts of encapsulation, inheritance, and polymorphism by reading these books. It needs to be realized in practice.
Class describes a group of objects with the same features and behaviors, including data elements and methods/functions that operate on the data, the data element is a set of data types that describe the machine storage unit, such as int and Char. It describes the basic features of the object, and the method or function is to operate on the data, is the behavior of object features.
Without inheritance, there is no polymorphism, and encapsulation can be the greatest embodiment in inheritance. Encapsulation includes not only data, but also some methods for operating data. Inheritance represents the similarity between the basic type and the inheritance type. polymorphism is a delayed Association, is implemented using virtual functions.
I soon completed the first chapter and found that I did not understand it at all, not just cloud. In particular, the methodology is virtual.