コード例 #1
0
 public static void Dispense(string soda, Backpack backpack)
 {
     Console.WriteLine($"the machine spits out a {soda} and youput it in your bag. Your bag now contains {backpack.cans.Count} cans of soda\n");
 }
コード例 #2
0
ファイル: Customer.cs プロジェクト: Ktenbrook1/SodaaMachine
 public Customer()
 {
     backpack = new Backpack();
     wallet   = new Wallet();
 }
コード例 #3
0
 public Customer()
 {
     wallet   = new Wallet();
     backpack = new Backpack();
     intInput = 0;
 }
コード例 #4
0
        //reuse this method when customer gives too much money

        public void AddCanstoBackPack(Can canDispensedFromMachine, Backpack backpack)
        {
            inventory.Remove(canDispensedFromMachine);
            backpack.cans.Add(canDispensedFromMachine);
        }
コード例 #5
0
 //Constructor
 public Customer()
 {
     wallet   = new Wallet(5, 50, 20, 20, 10);
     backpack = new Backpack();
 }
コード例 #6
0
 //Constructor (Spawner)
 public Customer()
 {
     //Wallet = new Wallet(); need to uncomment this later
     Backpack = new Backpack();
 }
コード例 #7
0
 //Constructor
 public Customer()
 {
     wallet   = new Wallet();
     backPack = new Backpack();
 }