Leading You To Understand OOP(II)

The content of Object-Oriented

  • Class – it defines the abstract characteristics of a thing. Class definition includes the form of data and the operation of data.
  • Object – it is instances of classes.check here
  • The member variable – is defined as a variable within the class. The value of the variable is invisible to the outside world, but it can be accessed through member functions. After the class is instantiated as an object, the variable can be called the attribute of the object.
  • The member function – is defined within the class and can be used to access the data of the object.
  • Inheritance – inheritance is a mechanism for subclasses to automatically share parent data structures and methods, which is a relationship between classes. When defining and implementing a class, it can be done on the basis of an existing class, taking the content defined by the existing class as its own content, and adding some new content. (Its keyword as Extend.)
  • The parent class – a class is inherited by other classes, check here which can be called a parent class, a base class, or a superclass.
  • Subclass – A class that inherits other classes is called a subclass, or a derived class.
  • Abstraction Abstraction – refers to the abstraction of objects with consistent data structures (attributes) and behaviors (operations) into classes. A class is such an abstraction, which reflects the important properties related to application and ignores other irrelevant content. The division of any class is subjective, but it must be related to the specific application. (Its keyword as Abstract.)
  • Polymorphism – polymorphism refers to that the same function or method can act on many types of objects and obtain different results. Different objects can produce different results when they receive the same message. This phenomenon is called polymorphism.check here
  • Overload – Simply put, a function or method has the same name, but the list of parameters is different. Such functions or methods with the same name and different parameters are called overloaded functions or methods.
  • Encapsulation – the encapsulation refers to binding the attributes and behaviors of an object in the real world and placing them in a logical unit.