void Pay(int amount) { int current = money.GetCash(); if (current < amount) { MessageBox.Show("Not enough money."); } else { money.SetCash(current - amount); } }
public void GetBalance() { MessageBox.Show("Your balance: " + money1.GetCash() + "."); }
/*! * \return double * Shows users's balance. */ public double GetBalance() { return(money1.GetCash()); }
public void PayCredit(IMoney m) { m.SetCash(m.GetCash() - GetCredit()); SetCredit(0); }