单选题

The wrong statement about inheritance is: ( )

A、

Inheritance is a method of reusing new functions by extending the implementation of an existing object.

B、

A generalization class (superclass) can explicitly capture those public properties and methods. Special classes (subclasses) extend the implementation by attaching properties and methods.

C、

Breaks encapsulation because it exposes the implementation details of the parent class to the child class.

D、

Inheritance is essentially "white box reuse". Modifications to the parent class will not affect the subclass.

下载APP答题
由4l***fd提供 分享 举报 纠错

相关试题

单选题 The two major themes of design patterns are ( )

A、

System maintenance and development

B、

Object composition and class inheritance

C、

System Architecture and System Development

D、

System Reuse and System Expansion

单选题 Be dependent on abstractions, not concrete. That is, programming for the interface, not for the implementation, is the expression of ( )

A、

Open-closed principle

B、

Interface Segregation Principle

C、

Liskov Substitution Principle

D、

Dependency Inversion Principle

单选题 In the observer mode, the wrong statement is ( )

A、

The update of the observer role is passive.

B、

The observed can notify the observer to update

C、

The observer can change the state of the observed, and then the observed will notify all observers to proceed according to the state of the observed.

D、

All the above statements are wrong.

单选题 According to the idea of design pattern, the priority should be used in program development ( ) Relation to achieve reuse.

A、

delegation

B、

inheritance

C、

creation

D、

none of the above

单选题 Which design pattern is represented by the following class diagram? ( )b3a0343ae23a84d26a4acf7a6d27dc0e

A、

Template Method

B、

Command

C、

Memento

D、

State

单选题 The meaning of the Open-Close principle is that a software entity ( )

A、

It should be open for extension and closed for modification.

B、

Should be open to modification and closed to extension

C、

Should be open to inheritance and closed to modification

D、

None of the above is correct

单选题 "Don't talk to strangers" is a popular expression of principle ( )

A、

Interface isolation

B、

Liskov substitution

C、

Dependency inversion

D、

Demeter: An object should know as little as possible about other objects

单选题 The following are object-oriented basic principles ( )

A、

Inheritance

B、

Encapsulation

C、

Liskov substitution

D、

Neither