Programming Concepts and Programming Concepts
(Personal understanding)
Object Oriented Programming (OOP) is mainly embodied in encapsulation, inheritance, polymorphism, and virtual functions;
Encapsulation: Put the specific method to implement the function into a class. The caller does not need to know how to implement the function. Instead, the caller only needs to know what function it can implement, what the parameter needs and the type of the returned value can be used to achieve the desired effect;
Inheritance: the member and method of the parent class (base class). If the subclass (derived class) inherits it, it can have all the Members and methods of the parent class, child classes can override the methods of the parent class and write new members and methods;
Destructor :~ Class Name () {}, the content of the Destructor is executed after the class is executed, and the resource release operation is usually executed;
Interface: the name of the interface definition function. It implements the interface class, writes the specific operation method, and implements all the methods of the interface;
Abstract ):
Polymorphism: subclasses can be assigned to the parent class. The parent class is in multiple States. For example, the parent class is a computer, and the Child classes include Asus computers and Apple computers;