예제 #1
0
        public void printReport()
        {
            string message = String.Format("Inventory: {0}\nState:{1}\nLocation:{2}", gumballMachine.GetCount(),
                                           gumballMachine.GetState(), gumballMachine.GetLocation());

            Console.WriteLine(message);
        }
예제 #2
0
 public void Report()
 {
     Console.WriteLine("Gumball Machine: " + machine.GetLocation());
     Console.WriteLine("Current inventory: " + machine.GetCount() + " gumballs");
     Console.WriteLine("Current state: " + machine.GetState());
 }