public override bool Equals(System.Object otherBooks) { if (!(otherBooks is Books)) { return(false); } else { Books newBooks = (Books)otherBooks; bool titleEquality = this.GetTitle() == newBooks.GetTitle(); bool idEquality = this.GetId() == newBooks.GetId(); bool authorEquality = this.GetAuthor() == newBooks.GetAuthor(); bool dueDateEquality = this.GetDueDate() == newBooks.GetDueDate(); return(titleEquality && idEquality && authorEquality && dueDateEquality); } }