Object-oriented foundation study notes

 Understanding of object-oriented: 

       1. Object Oriented has three characteristics: encapsulation , inheritance and polymorphism , there is no process-oriented inheritance and polymorphism, and packaging process for encapsulating function only, and the object-oriented can encapsulate data and functionality . So the more obvious advantages of object-oriented.

  2. a classic metaphor: rice bowl is object-oriented, process-oriented is fried rice. Benefit rice bowl is the "food", "food" separation , thereby increasing the flexibility of making rice bowl. Rice satisfied with the change of rice, vegetables are not satisfied with changing dishes. In technical terms of software engineering is the " maintainability " is better, "rice" and "food" coupling is relatively low .

       3. Object is a data structure (data management), the data and behavioral data put together. In memory, the object is a block of memory , to store the data set related . The nature of the object on one kind of data is organized .

  Understanding Classes and Objects:

       1. The objects are concrete things; the object is an abstract class;

  2 can be seen as a class-based object templates , the object class can be seen as a specific example .

  3. an abstract class is used to describe the same type of object, class defined in this category should have a common object properties, methods .

Guess you like

Origin www.cnblogs.com/augenstern/p/12459438.html