Beispiel #1
0
 private void removeTransaction(IPerson person, IBook book)
 {
     if (!this.transactions.ContainsKey(person))
     {
         throw new BorrowException("This person (" + person.ID + ") doesn't borrow any book.");
     }
     else
     {
         if (this.transactions[person].Contains(book))
         {
             book.incrementCounter();
             this.transactions[person].Remove(book);
         }
         else
         {
             throw new BorrowException("This person (" + person.ID + ") doesn't borrow this book (" + book.ISBN + ").");
         }
     }
 }