建造者模式
2022-10-24 15:41:47 19 举报
设计模式
作者其他创作
大纲/内容
<interface>ComputerBuilder
+ getComputer():Computer+ setXX():XX
Computer
- CPU:String- GPU:String- price:double
+ getXX():XX+ setXX():XX
Director
+ buildComputer(ComputerBuilder cb):Computer
Client
builder.setCpu();builder.setGpu();builder.setRAM();builder.setHd();
Computer01
- computer:Computer
+ getComputer():Computer+ setXX1():XX+ setXX2():XX+ setXX3():XX
Computer02
0 条评论
回复 删除
下一页