【面向对象】面向对象程序设计测试题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
總結
以上是生活随笔為你收集整理的【面向对象】面向对象程序设计测试题12-设计模式测试题的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: (三)Clang/ LLVM编译流程简述
- 下一篇: 【Python】Matplotlib切割