1200字范文,内容丰富有趣,写作的好帮手!
1200字范文 > 【面向对象】面向对象程序设计测试题12-设计模式测试题

【面向对象】面向对象程序设计测试题12-设计模式测试题

时间:2022-11-28 13:06:51

相关推荐

【面向对象】面向对象程序设计测试题12-设计模式测试题

Test12:设计模式测试题

问题 1

The constructor of a class that adheres to the Singleton design pattern must have _____ visibility.

A. public

B. protected

C. private

D. package

答案:

C

问题 2

下面哪一个模式与策略模式是一类的?

A.Factory Method

B.Adapter

C.Iterator

D.Decorator

答案:

C

问题 3

What is design pattern?

A.describe practical solutions to common design problems that occur repeatedly in software development.

B.A description of the solution that includes the class structures that solve the problem

C.A description of the problem that the pattern addresses

D.A name that identifies the pattern

答案:

A

问题 4

The Strategy design pattern is likely to be useful when implementing which of the following?

I. An application that offers several alternate sorting algorithms

II. A simple class t

本内容不代表本网观点和政治立场,如有侵犯你的权益请联系我们处理。
网友评论
网友评论仅供其表达个人看法,并不表明网站立场。