anaconda是python的超级集合?# Programming - 葵花宝典
H*M
1 楼
刚开始看design pattern不久,看到本版的一个设计题目,拿出来讨论一下.不怕版砖,请
尽量批评.
原题如下:
Do you approve the following design?
Class Furniture{
Some functions related to the property of furnitures;
};
4 classes derived from Furniture
Class wood_chair
Class steel_chair
Class wood_table
Class steel_table
What if you need to design a lot of other furnitures like desks.... with oth
er materials like plastics.
版上有牛牛们讲用decorator,我觉得也是.
一种材料一种class我觉得不妥.可以abstract成材料这个概念.
以下是写的class,请说说看有什么不妥的地方.
class Furniture{
virtual v
尽量批评.
原题如下:
Do you approve the following design?
Class Furniture{
Some functions related to the property of furnitures;
};
4 classes derived from Furniture
Class wood_chair
Class steel_chair
Class wood_table
Class steel_table
What if you need to design a lot of other furnitures like desks.... with oth
er materials like plastics.
版上有牛牛们讲用decorator,我觉得也是.
一种材料一种class我觉得不妥.可以abstract成材料这个概念.
以下是写的class,请说说看有什么不妥的地方.
class Furniture{
virtual v