State Pattern Code Review

Use the State Pattern

Code Review

Code Walkthrough

The Program class creates the Context object invokes methods on the Context class (object).

class Program { static void Main(string[] args) { Context context = new Context("Jim Johnson");
context.Deposit(500.00); context.PayInterest(); context.Deposit(300.00); context.Deposit(550.00); context.PayInterest(); context.Withdraw(2000.00); context.Withdraw(1100.00);
Console.Read(); } }