火急:高手快来。。。。。

阿士匹灵 2009-06-21 06:46:38
which pattern would you use to create a complex object and have the assembly and parts independent?
A: Prototype
B: Singleton
C: Builder
D: Abstract Factory

选哪个

...全文
37 11 打赏 收藏 转发到动态 举报
写回复
用AI写文章
11 条回复
切换为时间正序
请发表友善的回复…
发表回复
sebatinsky 2009-06-22
  • 打赏
  • 举报
回复
[Quote=引用 1 楼 jinxfei 的回复:]
C.

The Builder Pattern is a software design pattern. The intention is to abstract steps of construction of objects so that different implementations of these steps can construct different representations of objects.

Often, the Builder Pattern is used to build Products in accordance to the Composite pattern, a structure pattern.
[/Quote]
呵呵,语言真的是一个限制,不过希望楼主可以看懂
ndcs_dhf2008 2009-06-22
  • 打赏
  • 举报
回复
c
shuai45 2009-06-22
  • 打赏
  • 举报
回复
鸟语 不好的漂过。
w40338544 2009-06-22
  • 打赏
  • 举报
回复
看懂了一点..
cbynietg 2009-06-22
  • 打赏
  • 举报
回复
以上几个答案我认为只有建造者模式比较适合.
APOLLO_TS 2009-06-22
  • 打赏
  • 举报
回复
public interface Builder {
public Part getPart();
public wholeObject getWholeObject();
}
----------------------------------------------------------
the first level class that decide which builder to use!
----------------------------------------------------------
public class Designer {
public void build(Builder builder) {
builder.getPart();
builder.getWholeObject();
}
}
-------------------------------------------
now you will implements Builder
--------------------------------------------
public class BuilderImpl implements Builder {
public Part getPart(){}; //parts independent
public wholeObject getWholeObject(){}; // have the assembly
}
--------------------------
client call that!!
--------------------------
public class Client {

public static void main(String[] args) {
Builder builderImpl = new BuilderImpl ();
Designer designer = new Designer();
designer.build(builderImpl); //maybe different Builder
builderImpl.getPart();
builderImpl.getWholeObject(;
}
}
阿士匹灵 2009-06-22
  • 打赏
  • 举报
回复
没看懂耶
呵呵
阿士匹灵 2009-06-21
  • 打赏
  • 举报
回复
这是翻译过来的意思 也看不懂啊
我在google上翻译的
“该模式将您使用创建一个复杂的对象,并在大会和地方独立?”

呵呵
阿士匹灵 2009-06-21
  • 打赏
  • 举报
回复
不好意思啊
我也是着急 就拿上来了
2楼的朋友 写的是什么啊
别学我啊
我英文不好的哦
呵呵
qiheia 2009-06-21
  • 打赏
  • 举报
回复
哇塞,考验英语能力啊,LZ可以把题目翻译成中文吗,我看不懂啊。。。。。

I Guess D
jinxfei 2009-06-21
  • 打赏
  • 举报
回复
C.

The Builder Pattern is a software design pattern. The intention is to abstract steps of construction of objects so that different implementations of these steps can construct different representations of objects.

Often, the Builder Pattern is used to build Products in accordance to the Composite pattern, a structure pattern.

81,091

社区成员

发帖
与我相关
我的任务
社区描述
Java Web 开发
社区管理员
  • Web 开发社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧