C ++: object-oriented concepts

Object:

  • Objects in the general sense: the real world is a thing actually exists
  • Object The object oriented methodology: objective reality is a physical description of the system used

Abstract and classification:

  • Classification is based on the principle: Abstract
  • Abstract common attributes and behavior of objects of the same class to form class
  • Class relationship with the object:
    • Examples of the type of relationship

Package:

  • Internal details hidden objects
  • Foreign forming a boundary
  • Retaining only limited external interface
  • Easy to use, good security

inherit:

  • Significance of software reuse
  • Renovation, expansion of existing classes form a new class

Polymorphic:

  • The same message may cause a different effect on the behavior of different objects

~~~~~ END ~~~~~

Guess you like

Origin www.cnblogs.com/wbyixx/p/11979886.html