Design mode code comments are changed to English

https://github.com/huihut/interview/pull/73
This commit is contained in:
huihut
2020-12-16 16:07:24 +08:00
parent 8fe5157ae3
commit 3a9e2123aa
21 changed files with 78 additions and 78 deletions

View File

@@ -7,18 +7,18 @@
#include "product.h"
// 抽象工厂模式
// Abstract factory pattern
class Factory {
public:
enum FACTORY_TYPE {
BENZ_FACTORY, // 奔驰工厂
BMW_FACTORY, // 宝马工厂
AUDI_FACTORY // 奥迪工厂
BENZ_FACTORY, // Benz factory
BMW_FACTORY, // BMW factory
AUDI_FACTORY // Audi factory
};
virtual ICar* CreateCar() = 0; // 生产汽车
virtual IBike* CreateBike() = 0; // 生产自行车
static Factory * CreateFactory(FACTORY_TYPE factory); // 创建工厂
virtual ICar* CreateCar() = 0; // Production car
virtual IBike* CreateBike() = 0; // Production bicycle
static Factory * CreateFactory(FACTORY_TYPE factory); // Create factory
};
#endif //DESIGNPATTERN_FACTORY_H