protected void Page_Load(object sender, EventArgs e) { BankAccount ba = new BankAccount(); ba.accountNumber = 12345; ba.balance = 123.45f; Label1.Text = ba.accountNumber.ToString(); }
public void TransferFunds() { Assert.True(true); BankAccount source = new BankAccount(); BankAccount destination = new BankAccount(); source.Deposit(200F); Assert.AreEqual(200F, source.balance); source.Transfer(destination, 100F); Assert.AreEqual(100F, source.balance); Assert.AreEqual(100F, destination.balance); }
public void Transfer(BankAccount destination, float payment) { this.balance -= payment; destination.balance += payment; }