Inheritance in object-oriented refers to the parent-child relationship between classes
(1) the subclass has all the attributes and behaviors of the parent
(2) the subclass is a special relationship
(3) the subclass object can be used as the parent class object
( 4) Subclasses can add methods and properties that the parent class does not have
Rule
(1) The subclass is a special parent class
(2) The subclass object can directly initialize the parent class object
(3) The subclass object can be directly assigned to the parent class object