V2EX  ›  英汉词典

Derived Class

释义 Definition

派生类 / 子类:在面向对象编程中,从另一个类(基类/父类)继承属性与方法的类。派生类可以在继承的基础上新增功能,也可以重写(override)基类的行为。(不同语言对继承语法与规则略有差异。)

发音 Pronunciation (IPA)

/dɪˈraɪvd klæs/

例句 Examples

A derived class inherits methods from its base class.
派生类会从它的基类继承方法。

In C++, the derived class overrides the virtual function to provide specialized behavior while still calling the base implementation when needed.
在 C++ 中,派生类通过重写虚函数来提供更具体的行为,同时在需要时仍可调用基类的实现。

词源 Etymology

derived 来自动词 derive(“源自、从……得到”),class 表示“类”。合在一起字面意思是“从某个类衍生出来的类”。该术语随着面向对象编程(如 C++、Java 等)的发展而普及,用来描述继承关系中的“子类”。

相关词 Related Words

文学与作品 Notable Works

  • The C++ Programming Language(Bjarne Stroustrup)
  • *Effective C++*(Scott Meyers)
  • Design Patterns: Elements of Reusable Object-Oriented Software(Gamma, Helm, Johnson, Vlissides)
  • C# in Depth(Jon Skeet)
关于   ·   帮助文档   ·   自助推广系统   ·   博客   ·   API   ·   FAQ   ·   Solana   ·   752 人在线   最高记录 6679   ·     Select Language
创意工作者们的社区
World is powered by solitude
VERSION: 3.9.8.5 · 12ms · UTC 19:07 · PVG 03:07 · LAX 11:07 · JFK 14:07
♥ Do have faith in what you're doing.