Example #1
0
        public void Rent(Book book, Student student)
        {
            if (book == null)
            {
                return;
            }
            book.Rent();
            var newPair = new RentPair(book, student);

            rentList.Add(newPair);
        }
Example #2
0
        public override bool Equals(object obj)
        {
            RentPair pair = (RentPair)obj;

            return(pair.student.Equals(student) && pair.book.Equals(book));
        }
Example #3
0
 public void DeleteRent(RentPair pair)
 {
     rentList.Remove(pair);
 }