Inheritance is the means by which objects of a class can access member variables and functions contained in previously defined class, without having to restate those definitions.
继承是一种方法,通过它,类的对象可以访问以前精确定义过的类中的成员变量和函数,而不用重新声明那些定义。
In inheritance, the derived class receives the base class member variables and methods. This means that an order of inheritance must be followed during the construction of an object.
在继承中,派生类接受基类的成员变量和方法。这表示继承的顺序必须在对象构造的时候被遵守。
Moreover, it can optimize the whole design program by making use of inheritance relations of data members and member functions between the basic class and its derived class.
同时利用父类与子类间数据成员、成员函数的继承关系,可以优化曲线测设程序的整体设计。
应用推荐