设计模式之工厂模式
namespace SimpleFactory.Caculation_bll
{
/// <summary>
/// 所有具体策略类的父类
/// </summary>
public class Operation
{
private double numberA;
public double NumberA
{
get { return numberA; }
set { numberA = value; }
}
private double numberB;
public double NumberB
{
get { return numberB; }
set { numberB = value; }
}
//所有具体策略类的共同方法
public virtual double GetResult()
{
double result = 0;
return result;
}
}
}