Learn now: https://edu.csdn.net/course/play/26676/339578?utm_source=blogtoedu
Class: Abstraction of common affairs.
Common attributes and methods of the created objects.
Keywords: class
class class name (first letter capitalized)
Indent 4 spaces
Initialization method:
def __init__(self (must write),)
Do not write return.
Define common methods:
def method name (self (must write))
A class can specifically generate a certain object. This behavior is called instantiation.
The function of the initialization method is to execute this method once the instance is created.
Object: Represents a specific matter in the objective world space, and has basic elements in the solution space of the software system.
Object-oriented design: It is a paradigm of program design and a method of program development.