Exemple #1
0
        static void Main(string[] args)
        {
            // Keep program.cs minimal. All the work should happen in the classes

            // Instantiate a VirtualVendingMachine object. This will hold the balance for the machine
            // and the methods related to the vending machine
            VirtualVendingMachine vm = new VirtualVendingMachine();

            // Instantiate the VendingMachineCLI (command line interface). This object will be responsible
            // for the interaction with the user.
            VendingMachineCLI vendingMachineCLI = new VendingMachineCLI(vm);

            // Run the main method to start displaying menus to the user.
            vendingMachineCLI.Run();
        }
Exemple #2
0
 public static void Main(string[] args)
 {
     VendMachine       newVendingMachine = new VendMachine();
     Menus             runningMenus      = new Menus(newVendingMachine);
     VendingMachineCLI runningMachine    = new VendingMachineCLI(newVendingMachine, runningMenus);
 }
        static void Main(string[] args)
        {
            VendingMachineCLI menu = new VendingMachineCLI();

            menu.DisplayMenu();
        }