日期:2014-05-20 浏览次数:20909 次
public interface IRun { void RunLottery(); } public interface IBetting { void BettingLottery(); } public class 三色球 : IRun { public void RunLottery() { // } } public class 足彩 : IRun { public void RunLottery() { // } } public abstract class Lottery { protected IRun runBehavior; protected IBetting bettingBehavior; //开奖 public void Run() { this.runBehavior.RunLottery(); } //投注 public void Betting() { this.bettingBehavior.BettingLottery(); } //说明信息 public abstract void Summary(); }