使用C++重写《大话设计模式》中模式实例一(简单工厂模式)

题目:输入两个数和运算符,得到 结果。 下面是类图,使用简单工厂模式实现计算器的计算: 下面是 Operation.h程序: #pragma once //运算类 class Operation { private: double _numberA = 0; double _numberB = 0; public: void SetNumberA(double value) { _n
相关文章
相关标签/搜索