题目内容

试题四(共25分) 阅读以下关于面向对象系统建模的叙述,在答题纸上回答问题。[说明] 某软件企业为影音产品销售公司W开发一套在线销售系统,以提升服务的质量和效率。项目组经过讨论后决定采用面向对象方法开发该系统。在设计建模阶段需要满足以下设计要求:(1)W公司经常进行促销活动。根据不同的条件(如订单总额、商品数量、产品种类等),公司可以提供百分比折扣或现金减免等多种促销方式供提交订单的用户选择。实现每种促销活动的代码量很大,且会随促销策略不同经常修改。系统设计中需要考虑现有的促销和新的促销,而不用经常地重写控制器类代码。(2)该在线销售系统需要计算每个订单的税率,不同商品的税率及计算方式会有所区别。所以W公司决定在系统中直接调用不同商品供应商提供的税率计算类,但每个供应商的类提供了不同的调用方法。系统设计中需要考虑如果公司更换了供应商,应该尽可能少地在系统中修改或创建新类。 项目组架构师决定采用设计模式来满足上述设计要求,并确定从当前已经熟练掌握的设计模式中进行选择,这些设计模式包括:适配器模式(Adapter)、构造器模式(Builder)、命令模式(Command)、外观模式(Facade)、中介模式(Mediator)、原型模式(Prototype)、代理模式(Proxy)、状态模式(State)和策略模式(Strategy)等。 针对题目中所提出的设计要求(1)和(2),项目组应该分别选择何种设计模式请分别用200字以内文字说明具体的解决方案。

查看答案
更多问题

在Word中的“工具栏”对话框中,可以看到“常用”和“格式”前面的方框中设有“√”,这说明这两组工具栏显示在屏幕上。

A. 对
B. 错

在Word中如果要删除一张插入的图片可以先选中该图片,再按Delete键。

A. 对
B. 错

试题一(共25分) 阅读以下关于软件架构风格的说明,在答题纸上回答问题。[说明] 某软件公司为其新推出的字处理软件设计了一种脚本语言,专门用于开发该字处理软件的附加功能插件。为了提高该语言的编程效率,公司组织软件工具开发部门为脚本语言研制一套集成开发环境。软件工具开发部门根据字处理软件的特点,对集成开发环境进行了需求分析,总结出以下3项核心需求:(1)集成开发环境需要提供对脚本语言的编辑、语法检查、解释、执行和调试等功能的支持,并要实现各种功能的灵活组合、配置与替换。(2)集成开发环境需要提供一组可视化的编程界面,用户通过对界面元素拖曳和代码填充的方式就可以完成功能插件核心业务流程的编写与组织。(3)在代码调试功能方面,集成开发环境需要实现在脚本语言编辑界面中的代码自动定位功能。具体来说,在调试过程中,编辑界面需要响应调试断点命中事件,并自动跳转到当前断点处所对应的代码。针对上述需求,软件工具开发部门对集成开发环境的架构进行分析与设计,王工认为该集成开发环境应该采用管道—过滤器的架构风格实现,李工则认为该集成开发环境应该采用以数据存储为中心的架构风格来实现。公司组织专家对王工和李工的方案进行了评审,最终采用了李工的方案。 请用200字以内的文字解释什么是软件架构风格,并从集成开发环境与用户的交互方式、集成开发环境的扩展性、集成开发环境的数据管理三个方面说明为什么最终采用了李工的设计方案。

Qusetions 11-15 are based on the following passage: Ernest Hemingway wrote a short story called"The Capital of the World."In it he tells about a Spanish father who wants to reconcile(和解)with his son who has run away to Madrid.In order to locate the boy he takes out this ad in the newspaper;"Paco,meet me at Hotel Montanan at noon on Tuseday.All is forgiven.Love,Papa." Paco is a common name in Spain,and when the father goes to the square th finds 800 young men named Paco waiting for their fathers. What drew them to the hotel?As Hemingway tells it, it was the words "All is forgiven."The father did not say,"All WILL BE forgiven IF you do this or that."Not,"All WILL BE forgiven WHEN you do such and such."He simply says,"All is forgiven."No strings attached. And that's the hard part-un-attaching the strings.The origin of the expression"no strings attached"may go back to ancient times when documents were wrtten on parchment(羊皮卷)that were rolled up and secured with a string. The Babylonian Talmud(犹太法典)tells of a man who gives his wife a bill of divorce on such a parchment,but holds onto the string so that he can snatch it back,should e choose to do so.The divorce,therefore,is not considered valid since he will not give it freely.Similarly,love,forgiveness or friendship that is given with strings attached are not valid,since they can be snatched back at any time It can be learned from the last paragraph that()。

A. the man wanted to give his wife freedom
B. the wife redused to give her husband a free divorce
C. the wife did not want to divirce her husband
D. the man gave his wife a restricted divorce

答案查题题库