息肌丸是什么| 维民所止什么意思| 怀孕一周有什么症状| 喝什么茶养肝护肝最好| 什么饮料解酒效果最好| 吃什么东西会误测怀孕| 西米露是什么做的| 匹马棉是什么面料| 金晨为什么叫大喜| 回盲肠在什么位置| 分山念什么| 上午十点多是什么时辰| 什么品牌的冰箱好| 庚寅五行属什么| 4月2号是什么星座| 巴不得是什么意思| 梅毒螺旋体抗体阳性是什么意思| 高血糖适合吃什么水果| ldpe是什么材料| 疤痕憩室是什么意思| 马步鱼为什么是甜的| 为什么怀孕前三个月不能说| 热得直什么| 血糖高吃什么好| 女人左手断掌什么命运| 人生百味下一句是什么| 梦见彩虹是什么征兆| 乌灵胶囊有什么副作用| 人心隔肚皮什么意思| 你好是什么意思| 看肺结节挂什么科| 肠胃胀气是什么原因| 耳鼻喉科主要看什么病| 儿童过敏吃什么药| 深喉是什么感觉| 屁股下垂穿什么裤子| 脚真菌感染用什么药| 海参不适合什么人吃| 兔死狗烹是什么生肖| 上颌窦炎吃什么药| 蜂蜜和什么不能一起吃| 冬至注意什么| 俄罗斯是什么人种| 外婆的弟弟叫什么| 尿里带血是什么原因男性| 今年78岁属什么生肖| rose是什么意思| 出来混迟早要还的什么意思| 纠察是什么意思| 脸霜什么牌子的好| 男生适合养什么小型犬| 足三里在什么位置图片| 地贫吃什么补血最快| 啤酒兑什么饮料好喝| 不假思索的假是什么意思| 凉粉是用什么做的| 宜祭祀是什么意思| 九月十四号是什么星座| 鞭长莫及是什么意思| 摩羯座后面是什么星座| 子宫糜烂用什么药| 尾戒代表什么| 宝宝肋骨外翻是什么原因| 25分贝相当于什么声音| 什么什么直跳| 咀嚼什么意思| 宫颈糜烂是什么原因造成的| 心脏跳的慢吃什么好| 吃了安宫牛黄丸要禁忌什么不能吃| vae是什么意思| 肛裂吃什么药| 不饱和脂肪酸是什么意思| 知青为什么要下乡| 为什么会长老年斑| viki什么意思| 满族八大碗都有什么菜| 1901年属什么生肖| 8月26是什么星座| 什么的讲| 乔迁送什么礼物好| 梅毒吃什么药最好| 12月份是什么星座| 搬新家送什么礼物好| 伪骨科是什么| 圆脸适合什么发型女| 放热屁是什么原因| 氟利昂什么味道| 正厅级是什么级别| 捡帽子有什么说法吗| 羊水破了是什么感觉| 捋一捋是什么意思| 孕期脸上长痘痘是什么原因| 心塞是什么意思| 圣母娘娘是什么神| 房客是什么意思| 嘴歪是什么病的前兆| 血漏是什么病| 生吃紫苏叶有什么功效| 梦见相亲是什么意思| 醋有什么功效和作用| 晚上睡觉经常醒是什么原因| 晚上做梦梦到蛇是什么意思| 端粒酶是什么| 烟雾病是什么| 书到用时方恨少下一句是什么| 梦见性生活是什么意思| 肾虚去医院挂什么科| 贡中毒有什么症状| 势力是什么意思| 屎壳郎吃什么| 红豆有什么功效和作用| 玥是什么意思| 背疽是什么病| 一什么花瓣| 泡泡什么意思| 喉镜能检查出什么病| 社日是什么意思| 指甲紫色是什么病的征兆| 心衰吃什么药效果最好| 小肚子胀痛什么原因| 着了过是什么词| 为什么会长寻常疣| 纤维蛋白原是什么意思| 晕车药有什么副作用| 咳血鲜红是什么病呢| chevy是什么车| 放的偏旁是什么| 健康状况填什么| 白蛋白低是什么意思| 弱肉强食什么意思| 积液是什么原因造成的怎么治疗| 浮世是什么意思| 油腻腻的什么| 老做梦是什么原因| 浮世是什么意思| 后背疼是什么原因引起的女性| 肾积水是什么原因| 男人少精弱精吃什么补最好| 举案齐眉什么意思| cps是什么单位| 喝酒吃海带有什么危害| 梦见巨蟒是什么预兆| ab型和b型生的孩子是什么血型| 奥特莱斯是什么店| mfr是什么意思| 灌肠为什么能通输卵管| 无厘头是什么意思| 胎儿腹围偏大说明什么| 什么是风象星座| 保养是什么意思| coa是什么| 6月24日什么星座| 日在校园讲的什么| 指甲发白是什么原因| 甜菜根是什么菜| 手指爆皮是什么原因| 骨感是什么意思| 豆是什么结构| 老人肚子胀是什么原因| 腹膜刺激征是指什么| 电销是什么工作| 亮晶晶的什么| 猪肝吃多了有什么坏处| 介入超声是什么意思| 胡萝卜和什么不能一起吃| soeasy是什么意思| 中级什么时候考试| 他长什么样| 心悸吃什么药| 妈妈生日送什么礼物| 什么叫化学性肝损伤| 手指发麻是什么原因| 咏柳中的咏是什么意思| delsey是什么牌子| 头痛眼睛痛什么原因引起的| 衄血是什么意思| 忌是什么意思| 肠胃湿热吃什么药| 1997年属牛的是什么命| 灵芝孢子粉什么时候吃最好| cpi是什么意思啊| 做什么运动能瘦肚子| 日柱金舆是什么意思| 甘油三酯偏高说明什么| 玉米须泡水喝有什么功效| 虎的偏旁是什么| 你从什么时候不再爱我| 渗透压是什么意思| 心脏缺血吃什么药好| 50岁今年属什么生肖| 梦见房子漏水是什么意思| 早上吃鸡蛋有什么好处| 咳嗽有什么特效药| 查肝胆胰脾肾挂什么科| 口水歌是什么意思| 腿抖是什么病的预兆| 同人小说是什么意思| 满面红光是什么意思| 为什么身体没力气也没有精神| 什么是文字狱| 浪子回头是什么意思| 浸洗是什么意思| 短裤搭配什么鞋子| 1964年是什么年| 维生素b什么时候吃效果最好| 神经根型颈椎病吃什么药| 蓝本是什么意思| 锋芒的意思是什么| 盆腔炎吃什么药有效| 铁观音属于什么茶| 什么叫精神出轨| 第一次要注意什么| 脾虚如何调理吃什么药| 蟑螂长什么样| 转折是什么意思| 湿痹是什么意思| 山什么路| 为什么射不出来| 阴阳八卦是什么生肖| 七月四日是什么星座| 眼带用什么方法消除| 妃嫔是什么意思| 肩胛骨疼痛是什么原因| 肺结核复发有什么症状| 省委组织部长是什么级别| 血热吃什么药快速见效| 打桩是什么意思| 神父是什么意思| 胃胀是什么症状| 有氧运动是什么| 熬中药用什么锅最好| 什么是双重人格| 头发属于什么组织| editor是什么意思| damon英文名什么寓意| 肉烧什么好吃| 考妣是什么意思| 红楼梦什么朝代| 大连焖子是什么做的| 阴唇内侧长疙瘩是什么原因| 卵泡不破是什么原因造成的| 变爻是什么意思| 捂脸表情什么意思| 取保候审是什么意思还会判刑吗| a型rh阳性是什么意思| 棕色用什么颜色调出来| 新生婴儿吃什么奶粉| 痛风吃什么蔬菜好| 护身符是什么意思| A型血为什么是完美血型| 三里屯有什么好玩的地方| 一去不返是什么生肖| 神器积分换什么最划算| 老公的妈妈叫什么| 命运是什么意思| 什么山| 功能性消化不良是什么意思| 2月14日是什么星座| 肝肿大是什么原因| 痔疮是什么样的图片| gi是什么意思| 女性阴毛变白是什么原因| 嘴巴里苦是什么原因| 安然无恙的恙是什么意思| 百度

泰宁县文化馆喜获“国家一级文化馆”荣誉

百度 新车的长宽高分别为4730mm/1824mm/1421mm,轴距达到了2860mm,相比较现款车型增加了85mm。

In object-oriented programming, inheritance is the mechanism of basing an object or class upon another object (prototype-based inheritance) or class (class-based inheritance), retaining similar implementation. Also defined as deriving new classes (sub classes) from existing ones such as super class or base class and then forming them into a hierarchy of classes. In most class-based object-oriented languages like C++, an object created through inheritance, a "child object", acquires all the properties and behaviors of the "parent object", with the exception of: constructors, destructors, overloaded operators and friend functions of the base class. Inheritance allows programmers to create classes that are built upon existing classes,[1] to specify a new implementation while maintaining the same behaviors (realizing an interface), to reuse code and to independently extend original software via public classes and interfaces. The relationships of objects or classes through inheritance give rise to a directed acyclic graph.

An inherited class is called a subclass of its parent class or super class. The term inheritance is loosely used for both class-based and prototype-based programming, but in narrow use the term is reserved for class-based programming (one class inherits from another), with the corresponding technique in prototype-based programming being instead called delegation (one object delegates to another). Class-modifying inheritance patterns can be pre-defined according to simple network interface parameters such that inter-language compatibility is preserved.[2][3]

Inheritance should not be confused with subtyping.[4][5] In some languages inheritance and subtyping agree,[a] whereas in others they differ; in general, subtyping establishes an is-a relationship, whereas inheritance only reuses implementation and establishes a syntactic relationship, not necessarily a semantic relationship (inheritance does not ensure behavioral subtyping). To distinguish these concepts, subtyping is sometimes referred to as interface inheritance (without acknowledging that the specialization of type variables also induces a subtyping relation), whereas inheritance as defined here is known as implementation inheritance or code inheritance.[6] Still, inheritance is a commonly used mechanism for establishing subtype relationships.[7]

Inheritance is contrasted with object composition, where one object contains another object (or objects of one class contain objects of another class); see composition over inheritance. In contrast to subtyping’s is-a relationship, composition implements a has-a relationship.

Mathematically speaking, inheritance in any system of classes induces a strict partial order on the set of classes in that system.

History

edit

In 1966, Tony Hoare presented some remarks on records, and in particular, the idea of record subclasses, record types with common properties but discriminated by a variant tag and having fields private to the variant.[8] Influenced by this, in 1967 Ole-Johan Dahl and Kristen Nygaard presented a design that allowed specifying objects that belonged to different classes but had common properties. The common properties were collected in a superclass, and each superclass could itself potentially have a superclass. The values of a subclass were thus compound objects, consisting of some number of prefix parts belonging to various superclasses, plus a main part belonging to the subclass. These parts were all concatenated together.[9] The attributes of a compound object would be accessible by dot notation. This idea was first adopted in the Simula 67 programming language.[10] The idea then spread to Smalltalk, C++, Java, Python, and many other languages.

Types

edit
 
Single inheritance
 
Multiple inheritance

There are various types of inheritance, based on paradigm and specific language.[11]

Single inheritance
where subclasses inherit the features of one superclass. A class acquires the properties of another class.
Multiple inheritance
where one class can have more than one superclass and inherit features from all parent classes.

"Multiple inheritance ... was widely supposed to be very difficult to implement efficiently. For example, in a summary of C++ in his book on Objective C, Brad Cox actually claimed that adding multiple inheritance to C++ was impossible. Thus, multiple inheritance seemed more of a challenge. Since I had considered multiple inheritance as early as 1982 and found a simple and efficient implementation technique in 1984, I couldn't resist the challenge. I suspect this to be the only case in which fashion affected the sequence of events."[12]

Multilevel inheritance
where a subclass is inherited from another subclass. It is not uncommon that a class is derived from another derived class as shown in the figure "Multilevel inheritance".
 
Multilevel inheritance
The class A serves as a base class for the derived class B, which in turn serves as a base class for the derived class C. The class B is known as intermediate base class because it provides a link for the inheritance between A and C. The chain ABC is known as inheritance path.
A derived class with multilevel inheritance is declared as follows:
// C++ language implementation
class A { ... };      // Base class
class B : public A { ... };   // B derived from A
class C : public B { ... };   // C derived from B
This process can be extended to any number of levels.
Hierarchical inheritance
This is where one class serves as a superclass (base class) for more than one sub class. For example, a parent class, A, can have two subclasses B and C. Both B and C's parent class is A, but B and C are two separate subclasses.
Hybrid inheritance
Hybrid inheritance is when a mix of two or more of the above types of inheritance occurs. An example of this is when a class A has a subclass B which has two subclasses, C and D. This is a mixture of both multilevel inheritance and hierarchal inheritance.

Subclasses and superclasses

edit

Subclasses, derived classes, heir classes, or child classes are modular derivative classes that inherit one or more language entities from one or more other classes (called superclass, base classes, or parent classes). The semantics of class inheritance vary from language to language, but commonly the subclass automatically inherits the instance variables and member functions of its superclasses.

The general form of defining a derived class is:[13]

class SubClass: visibility SuperClass
{
    // subclass members
};
  • The colon indicates that the subclass inherits from the superclass. The visibility is optional and, if present, may be either private or public. The default visibility is private. Visibility specifies whether the features of the base class are privately derived or publicly derived.

Some languages also support the inheritance of other constructs. For example, in Eiffel, contracts that define the specification of a class are also inherited by heirs. The superclass establishes a common interface and foundational functionality, which specialized subclasses can inherit, modify, and supplement. The software inherited by a subclass is considered reused in the subclass. A reference to an instance of a class may actually be referring to one of its subclasses. The actual class of the object being referenced is impossible to predict at compile-time. A uniform interface is used to invoke the member functions of objects of a number of different classes. Subclasses may replace superclass functions with entirely new functions that must share the same method signature.

Non-subclassable classes

edit

In some languages a class may be declared as non-subclassable by adding certain class modifiers to the class declaration. Examples include the final keyword in Java and C++11 onwards or the sealed keyword in C#. Such modifiers are added to the class declaration before the class keyword and the class identifier declaration. Such non-subclassable classes restrict reusability, particularly when developers only have access to precompiled binaries and not source code.

A non-subclassable class has no subclasses, so it can be easily deduced at compile time that references or pointers to objects of that class are actually referencing instances of that class and not instances of subclasses (they do not exist) or instances of superclasses (upcasting a reference type violates the type system). Because the exact type of the object being referenced is known before execution, early binding (also called static dispatch) can be used instead of late binding (also called dynamic dispatch), which requires one or more virtual method table lookups depending on whether multiple inheritance or only single inheritance are supported in the programming language that is being used.

Non-overridable methods

edit

Just as classes may be non-subclassable, method declarations may contain method modifiers that prevent the method from being overridden (i.e. replaced with a new function with the same name and type signature in a subclass). A private method is un-overridable simply because it is not accessible by classes other than the class it is a member function of (this is not true for C++, though). A final method in Java, a sealed method in C# or a frozen feature in Eiffel cannot be overridden.

Virtual methods

edit

If a superclass method is a virtual method, then invocations of the superclass method will be dynamically dispatched. Some languages require that method be specifically declared as virtual (e.g. C++), and in others, all methods are virtual (e.g. Java). An invocation of a non-virtual method will always be statically dispatched (i.e. the address of the function call is determined at compile-time). Static dispatch is faster than dynamic dispatch and allows optimizations such as inline expansion.

Visibility of inherited members

edit

The following table shows which variables and functions get inherited dependent on the visibility given when deriving the class, using the terminology established by C++.[14]

Base class visibility Derived class visibility
Private derivation Protected derivation Public derivation
  • Private →
  • Protected →
  • Public →
  • Not inherited
  • Private
  • Private
  • Not inherited
  • Protected
  • Protected
  • Not inherited
  • Protected
  • Public

Applications

edit

Inheritance is used to co-relate two or more classes to each other.

Overriding

edit
 
Illustration of method overriding

Many object-oriented programming languages permit a class or object to replace the implementation of an aspect—typically a behavior—that it has inherited. This process is called overriding. Overriding introduces a complication: which version of the behavior does an instance of the inherited class use—the one that is part of its own class, or the one from the parent (base) class? The answer varies between programming languages, and some languages provide the ability to indicate that a particular behavior is not to be overridden and should behave as defined by the base class. For instance, in C#, the base method or property can only be overridden in a subclass if it is marked with the virtual, abstract, or override modifier, while in programming languages such as Java, different methods can be called to override other methods.[15] An alternative to overriding is hiding the inherited code.

Code reuse

edit

Implementation inheritance is the mechanism whereby a subclass re-uses code in a base class. By default the subclass retains all of the operations of the base class, but the subclass may override some or all operations, replacing the base-class implementation with its own.

In the following Python example, subclasses SquareSumComputer and CubeSumComputer override the transform() method of the base class SumComputer. The base class comprises operations to compute the sum of the squares between two integers. The subclass re-uses all of the functionality of the base class with the exception of the operation that transforms a number into its square, replacing it with an operation that transforms a number into its square and cube respectively. The subclasses therefore compute the sum of the squares/cubes between two integers.

 

Below is an example of Python.

class SumComputer:
    def __init__(self, a, b):
        self.a = a
        self.b = b

    def transform(self, x):
        raise NotImplementedError

    def inputs(self):
        return range(self.a, self.b)

    def compute(self):
        return sum(self.transform(value) for value in self.inputs())

class SquareSumComputer(SumComputer):
    def transform(self, x):
        return x * x

class CubeSumComputer(SumComputer):
    def transform(self, x):
        return x * x * x

In most quarters, class inheritance for the sole purpose of code reuse has fallen out of favor.[citation needed] The primary concern is that implementation inheritance does not provide any assurance of polymorphic substitutability—an instance of the reusing class cannot necessarily be substituted for an instance of the inherited class. An alternative technique, explicit delegation, requires more programming effort, but avoids the substitutability issue.[citation needed] In C++ private inheritance can be used as a form of implementation inheritance without substitutability. Whereas public inheritance represents an "is-a" relationship and delegation represents a "has-a" relationship, private (and protected) inheritance can be thought of as an "is implemented in terms of" relationship.[16]

Another frequent use of inheritance is to guarantee that classes maintain a certain common interface; that is, they implement the same methods. The parent class can be a combination of implemented operations and operations that are to be implemented in the child classes. Often, there is no interface change between the supertype and subtype- the child implements the behavior described instead of its parent class.[17]

Inheritance vs subtyping

edit

Inheritance is similar to but distinct from subtyping.[4] Subtyping enables a given type to be substituted for another type or abstraction and is said to establish an is-a relationship between the subtype and some existing abstraction, either implicitly or explicitly, depending on language support. The relationship can be expressed explicitly via inheritance in languages that support inheritance as a subtyping mechanism. For example, the following C++ code establishes an explicit inheritance relationship between classes B and A, where B is both a subclass and a subtype of A and can be used as an A wherever a B is specified (via a reference, a pointer or the object itself).

class A {
 public:
  void DoSomethingALike() const {}
};

class B : public A {
 public:
  void DoSomethingBLike() const {}
};

void UseAnA(const A& a) {
  a.DoSomethingALike();
}

void SomeFunc() {
  B b;
  UseAnA(b);  // b can be substituted for an A.
}

In programming languages that do not support inheritance as a subtyping mechanism, the relationship between a base class and a derived class is only a relationship between implementations (a mechanism for code reuse), as compared to a relationship between types. Inheritance, even in programming languages that support inheritance as a subtyping mechanism, does not necessarily entail behavioral subtyping. It is entirely possible to derive a class whose object will behave incorrectly when used in a context where the parent class is expected; see the Liskov substitution principle.[18] (Compare connotation/denotation.) In some OOP languages, the notions of code reuse and subtyping coincide because the only way to declare a subtype is to define a new class that inherits the implementation of another.

Design constraints

edit

Using inheritance extensively in designing a program imposes certain constraints.

For example, consider a class Person that contains a person's name, date of birth, address and phone number. We can define a subclass of Person called Student that contains the person's grade point average and classes taken, and another subclass of Person called Employee that contains the person's job-title, employer, and salary.

In defining this inheritance hierarchy we have already defined certain restrictions, not all of which are desirable:

Singleness
Using single inheritance, a subclass can inherit from only one superclass. Continuing the example given above, a Person object can be either a Student or an Employee, but not both. Using multiple inheritance partially solves this problem, as one can then define a StudentEmployee class that inherits from both Student and Employee. However, in most implementations, it can still inherit from each superclass only once, and thus, does not support cases in which a student has two jobs or attends two institutions. The inheritance model available in Eiffel makes this possible through support for repeated inheritance.
Static
The inheritance hierarchy of an object is fixed at instantiation when the object's type is selected and does not change with time. For example, the inheritance graph does not allow a Student object to become an Employee object while retaining the state of its Person superclass. (This kind of behavior, however, can be achieved with the decorator pattern.) Some have criticized inheritance, contending that it locks developers into their original design standards.[19]
Visibility
Whenever client code has access to an object, it generally has access to all the object's superclass data. Even if the superclass has not been declared public, the client can still cast the object to its superclass type. For example, there is no way to give a function a pointer to a Student's grade point average and transcript without also giving that function access to all of the personal data stored in the student's Person superclass. Many modern languages, including C++ and Java, provide a "protected" access modifier that allows subclasses to access the data, without allowing any code outside the chain of inheritance to access it.

The composite reuse principle is an alternative to inheritance. This technique supports polymorphism and code reuse by separating behaviors from the primary class hierarchy and including specific behavior classes as required in any business domain class. This approach avoids the static nature of a class hierarchy by allowing behavior modifications at run time and allows one class to implement behaviors buffet-style, instead of being restricted to the behaviors of its ancestor classes.

Issues and alternatives

edit

Implementation inheritance has been controversial among programmers and theoreticians of object-oriented programming since at least the 1990s. Among the critics are the authors of Design Patterns, who advocate instead for interface inheritance, and favor composition over inheritance. For example, the decorator pattern (as mentioned above) has been proposed to overcome the static nature of inheritance between classes. As a more fundamental solution to the same problem, role-oriented programming introduces a distinct relationship, played-by, combining properties of inheritance and composition into a new concept.[citation needed]

According to Allen Holub, the main problem with implementation inheritance is that it introduces unnecessary coupling in the form of the "fragile base class problem":[6] modifications to the base class implementation can cause inadvertent behavioral changes in subclasses. Using interfaces avoids this problem because no implementation is shared, only the API.[19] Another way of stating this is that "inheritance breaks encapsulation".[20] The problem surfaces clearly in open object-oriented systems such as frameworks, where client code is expected to inherit from system-supplied classes and then substituted for the system's classes in its algorithms.[6]

Reportedly, Java inventor James Gosling has spoken against implementation inheritance, stating that he would not include it if he were to redesign Java.[19] Language designs that decouple inheritance from subtyping (interface inheritance) appeared as early as 1990;[21] a modern example of this is the Go programming language.

Complex inheritance, or inheritance used within an insufficiently mature design, may lead to the yo-yo problem. When inheritance was used as a primary approach to structure programs in the late 1990s, developers tended to break code into more layers of inheritance as the system functionality grew. If a development team combined multiple layers of inheritance with the single responsibility principle, this resulted in many very thin layers of code, with many layers consisting of only 1 or 2 lines of actual code.[citation needed] Too many layers make debugging a significant challenge, as it becomes hard to determine which layer needs to be debugged.

Another issue with inheritance is that subclasses must be defined in code, which means that program users cannot add new subclasses at runtime. Other design patterns (such as Entity–component–system) allow program users to define variations of an entity at runtime.

See also

edit

Notes

edit
  1. ^ This is generally true only in statically-typed class-based OO languages, such as C++, C#, Java, and Scala.

References

edit
  1. ^ Johnson, Ralph (August 26, 1991). "Designing Reusable Classes" (PDF). www.cse.msu.edu.
  2. ^ Madsen, OL (1989). "Virtual classes: A powerful mechanism in object-oriented programming". Conference proceedings on Object-oriented programming systems, languages and applications - OOPSLA '89. pp. 397–406. doi:10.1145/74877.74919. ISBN 0897913337. S2CID 1104130.
  3. ^ Davies, Turk (2021). Advanced Methods and Deep Learning in Computer Vision. Elsevier Science. pp. 179–342.
  4. ^ a b Cook, William R.; Hill, Walter; Canning, Peter S. (1990). Inheritance is not subtyping. Proceedings of the 17th ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages (POPL). pp. 125–135. CiteSeerX 10.1.1.102.8635. doi:10.1145/96709.96721. ISBN 0-89791-343-4.
  5. ^ Cardelli, Luca (1993). Typeful Programming (Technical report). Digital Equipment Corporation. p. 32–33. SRC Research Report 45.
  6. ^ a b c Mikhajlov, Leonid; Sekerinski, Emil (1998). A study of the fragile base class problem (PDF). Proceedings of the 12th European Conference on Object-Oriented Programming (ECOOP). Lecture Notes in Computer Science. Vol. 1445. Springer. pp. 355–382. doi:10.1007/BFb0054099. ISBN 978-3-540-64737-9. Archived from the original (PDF) on 2025-08-07. Retrieved 2025-08-07.
  7. ^ Tempero, Ewan; Yang, Hong Yul; Noble, James (2013). What programmers do with inheritance in Java (PDF). ECOOP 2013–Object-Oriented Programming. Lecture Notes in Computer Science. Vol. 7920. Springer. pp. 577–601. doi:10.1007/978-3-642-39038-8_24. ISBN 978-3-642-39038-8.
  8. ^ Hoare, C. A. R. (1966). Record Handling (PDF) (Technical report). pp. 15–16.
  9. ^ Dahl, Ole-Johan; Nygaard, Kristen (May 1967). Class and subclass declarations (PDF). IFIP Working Conference on Simulation Languages. Oslo: Norwegian Computing Center.
  10. ^ Dahl, Ole-Johan (2004). "The Birth of Object Orientation: the Simula Languages" (PDF). From Object-Orientation to Formal Methods. Lecture Notes in Computer Science. Vol. 2635. pp. 15–25. doi:10.1007/978-3-540-39993-3_3. ISBN 978-3-540-21366-6.
  11. ^ "C++ Inheritance". www.cs.nmsu.edu. Archived from the original on 2025-08-07. Retrieved 2025-08-07.
  12. ^ Stroustrup, Bjarne (1994). The Design and Evolution of C++. Pearson. p. 417. ISBN 9780135229477.
  13. ^ Schildt, Herbert (2003). The complete reference C++. Tata McGraw Hill. p. 417. ISBN 978-0-07-053246-5.
  14. ^ Balagurusamy, E. (2010). Object Oriented Programming With C++. Tata McGraw Hill. p. 213. ISBN 978-0-07-066907-9.
  15. ^ override(C# Reference)
  16. ^ "GotW #60: Exception-Safe Class Design, Part 2: Inheritance". Gotw.ca. Retrieved 2025-08-07.
  17. ^ Venugopal, K.R.; Buyya, Rajkumar (2013). Mastering C++. Tata McGraw Hill Education Private Limited. p. 609. ISBN 9781259029943.
  18. ^ Mitchell, John (2002). "10 "Concepts in object-oriented languages"". Concepts in programming language. Cambridge University Press. p. 287. ISBN 978-0-521-78098-8.
  19. ^ a b c Holub, Allen (1 August 2003). "Why extends is evil". Archived from the original on 24 February 2019. Retrieved 10 March 2015.
  20. ^ Seiter, Linda M.; Palsberg, Jens; Lieberherr, Karl J. (1996). "Evolution of object behavior using context relations". ACM SIGSOFT Software Engineering Notes. 21 (6): 46. CiteSeerX 10.1.1.36.5053. doi:10.1145/250707.239108.
  21. ^ America, Pierre (1991). Designing an object-oriented programming language with behavioural subtyping. REX School/Workshop on the Foundations of Object-Oriented Languages. Lecture Notes in Computer Science. Vol. 489. pp. 60–90. doi:10.1007/BFb0019440. ISBN 978-3-540-53931-5.

Further reading

edit
什么时候期末考试 什么吃辣椒抓耳挠腮 梦见自己光脚走路是什么意思 ctm是什么意思 假小子是什么意思
印堂发黑是什么原因 有什么小说 吃桃子对身体有什么好处 榴莲的寓意是什么意思 什么是情商
什么人容易得心肌炎 养狗需要注意什么 霍山石斛有什么作用 马标志的车是什么牌子 无患子为什么叫鬼见愁
疯狂动物城树懒叫什么 九月三日是什么日子 寡糖是什么糖 梨状肌综合症吃什么药 纳采是什么意思
类风湿关节炎不能吃什么食物hcv9jop1ns7r.cn 瑶字五行属什么hcv9jop3ns6r.cn 颈椎压迫神经挂什么科hcv8jop3ns1r.cn 颧骨高适合什么发型fenrenren.com 激素脸是什么样子hcv8jop4ns2r.cn
升读什么字hcv9jop6ns7r.cn 孔子是什么学派的创始人hcv7jop5ns4r.cn 什么病人要补氯化钾呢youbangsi.com 厥是什么意思hcv9jop2ns8r.cn 宫颈液基细胞学检查是什么hcv9jop3ns9r.cn
罗汉果有什么功效和作用hcv9jop4ns2r.cn 咳嗽呕吐是什么原因hcv9jop5ns7r.cn 游泳对身体有什么好处baiqunet.com 耳石症看什么科mmeoe.com 跑马是什么意思hcv8jop0ns8r.cn
猪油蒙了心是什么意思hcv8jop9ns3r.cn 给老人买什么礼物jinxinzhichuang.com 麸炒是什么意思hcv8jop8ns6r.cn 什么的脸庞hcv8jop9ns6r.cn 人流后吃什么恢复快hcv8jop1ns0r.cn
百度