private void button1_Click(object sender, EventArgs e) { if (bank >= 10) { bank -= joe.ReceiveCash(10); UpdateForm(); } else { MessageBox.Show("The bank is out of money"); } }
private void button3_Click(object sender, EventArgs e) { // joe gives $10 to bob bob.ReceiveCash(joe.GiveCash(10)); UpdateForm(); }