允许基于已有类来创建新类的OOP特性称为继承。The OOP feature that allows new classes to be created based on existing classes is called inheritance.
对
举一反三
- 当基于已有类创建子类的时候,已有类称为父类或基类,这个新类称为子类或派生类。When subclasses are created based on existing classes, existing classes are called parent classes or base classes, and this new class is called subclasses or derived classes.? 错误|正确
- Object-oriented programming allows you to derive new classes from existing classes. This is called ____________. A: encapsulation B: inheritance C: abstraction D: generalization
- 将数据与操作打包成一个单位,这种OOP的特性称为封装。Packaging data and operations into a single unit is a feature of OOP called encapsulation.
- 中国大学MOOC: 将数据与操作打包成一个单位,这种OOP的特性称为封装。Packaging data and operations into a single unit is a feature of OOP called encapsulation.
- 将数据与操作打包成一个单位,这种OOP的特性称为封装。Packaging data and operations into a single unit is a feature of OOP called encapsulation. A: 正确 B: 错误
内容
- 0
C#语言的核心是面向对象编程(OOP),所有OOP语言都应至少具有三个特性( ) A: 封装、继承和多态 B: 类、对象和方法 C: 封装、继承和派生 D: 封装、继承和接口
- 1
通过,可以基于已有类创建新的类,新类除了继承已有类的所有属性和方法,还可以根据需要增加新的属性和方法。
- 2
Which of these is not a fundamental features of OOP A: Encapsulation B: Inheritance C: Instantiation D: Polymorphism
- 3
Which one of the following statements is wrong about inheritance? ( ) A: Inheritance is one of the features of OOP B: Protected members of a class can be inherited C: The inheriting class is called a subclass D: Private members of a class can be inherited and accessed
- 4
在OOP中,当类的继承方式为公有继承时,基类的()和()的访问属性在派生类中不变,基类的()不可访问。