Example #1
0
 public GoldState(double balance, Account account)
 {
   StateName = "GOLD";
   Balance = balance;
   LowerLimit = 1000001.0;
   UpperLimit = double.MaxValue;
   Account = account;
 }
Example #2
0
 public BronzeState(double balance, Account account)
 {
   StateName = "BRONZE";
   Balance = balance;
   LowerLimit = 1000.0;
   UpperLimit = 50000.0;
   Account = account;
 }
Example #3
0
 public SilverState(double balance, Account account)
 {
   StateName = "SILVER";
   Balance = balance;
   LowerLimit = 50001.0;
   UpperLimit = 1000000.0;
   Account = account;
 }
Example #4
0
    public static void RunState()
    {
      var linus = new Account("Linus Torvalds");
      linus.Deposit(60000.0);
      linus.Deposit(20000000.0);

      linus.Withdraw(2055000.0);
      linus.PayIntrest(10.0);
    }