public void Rent(Book book, Student student) { if (book == null) { return; } book.Rent(); var newPair = new RentPair(book, student); rentList.Add(newPair); }
public override bool Equals(object obj) { RentPair pair = (RentPair)obj; return(pair.student.Equals(student) && pair.book.Equals(book)); }
public void DeleteRent(RentPair pair) { rentList.Remove(pair); }