public void InsertCoin(Coin coin) { if (coin.Value == CoinValue.Invalid) { throw new Exception("InvalidCoin"); } if (CurrentTransaction == null) { CurrentTransaction = new Transaction(coin); } else { CurrentTransaction.AddBalance(coin.MonetaryValue); } }