- 1、原创力文档(book118)网站文档一经付费(服务费),不意味着购买了该文档的版权,仅供个人/单位学习、研究之用,不得用于商业用途,未经授权,严禁复制、发行、汇编、翻译或者网络传播等,侵权必究。。
- 2、本站所有内容均由合作方或网友上传,本站不对文档的完整性、权威性及其观点立场正确性做任何保证或承诺!文档内容仅供研究参考,付费前请自行鉴别。如您付费,意味着您自己接受本站规则且自行承担风险,本站不退款、不进行额外附加服务;查看《如何避免下载的几个坑》。如果您已付费下载过本站文档,您可以点击 这里二次下载。
- 3、如文档侵犯商业秘密、侵犯著作权、侵犯人身权等,请点击“版权申诉”(推荐),也可以打举报电话:400-050-0827(电话支持时间:9:00-18:30)。
- 4、该文档为VIP文档,如果想要下载,成为VIP会员后,下载免费。
- 5、成为VIP后,下载本文档将扣除1次下载权益。下载后,不支持退款、换文档。如有疑问请联系我们。
- 6、成为VIP后,您将拥有八大权益,权益包括:VIP文档下载权益、阅读免打扰、文档格式转换、高级专利检索、专属身份标志、高级客服、多端互通、版权登记。
- 7、VIP文档为合作方或网友上传,每下载1次, 网站将根据用户上传文档的质量评分、类型等,对文档贡献者给予高额补贴、流量扶持。如果你也想贡献VIP文档。上传文档
查看更多
Sample Test Questions For Test 1
测试1的问题示例
Short Answer Questions(简答题):
a) What pattern is used when a class wants its subclasses to specify the objects it creates? (当一个类想要其子类确定它创建的对象时使用什么模式?)
b) What pattern is also known as recursive composition? (什么模式也称作递归组合?)
2) Select a pattern (other than Singleton) and discuss its potential uses, advantages and disadvantages. (选择一个模式(除单例模式外)并讨论其潜在用途和优缺点)
3) The following patterns were listed as reducing tight coupling: Abstract
Factory, Facade, Observer. Select one of these patterns and discuss how the pattern reduces coupling.(下列模式均用于降低紧耦合:抽象工厂、外观和观察者,选择其中一个模式并讨论它是如何降低耦合度的。)
4) What is the Open-Closed Principle? Give a small code example which
illustrates the principle. (什么是开闭原则?给出一小段代码实例来说明该原则。)
5) An indexed web page consists of a title and a list of label-URL pairs (the label is what is written on the web page, the URL is what is followed when the user selects that label). An indexed web page must support an operation to display itself (but might support a variety of other operations as well). We would like to be able to display a particular indexed web page in a variety of formats, including (but not limited to) a left-aligned, bulleted list of items; a centered, bulleted list of items; and a two-column table, where each column contains a bulleted list of items. We have several design constraints. First, clients should be able to have a particular indexed webobject display itself using different layouts at different times. Second, because displaying a list of indices is likely to be useful in other, more complex, types of web page classes, we want to be sure that we can easily reuse the code that accomplishes this task in other places.
Select the most appropriate design pattern to use to address the problem and show how it is applied. In particular, show an appropriate class diagram(s) and enough code fragments to illustrate your use of the pattern to solve the problem.
一个索引的网页由一个标题和一个标签-URL对(标签是写在网页上的内容,URL是当用户选择某个标签后
文档评论(0)