diff --git a/BuildingDirectory/Model/BusinessCard.cs b/BuildingDirectory/Model/BusinessCard.cs
index 8288fd3..a677529 100644
--- a/BuildingDirectory/Model/BusinessCard.cs
+++ b/BuildingDirectory/Model/BusinessCard.cs
@@ -52,14 +52,20 @@ public sealed class BusinessCard
///
/// Other object to compare to
/// True if the objects are equal; false otherwise
- // TODO
- public override bool Equals(object? obj)
- => false;
+ public override bool Equals(object? obj)
+ {
+ if (obj is not BusinessCard other)
+ {
+ return false;
+ }
+
+ return FirstName == other.FirstName && LastName == other.LastName;
+ }
///
/// Calculates the hash code for this object
///
/// Numeric hash code
- // TODO
- public override int GetHashCode() => -1;
+ // Uses XOR to combine the bits of each hash code
+ public override int GetHashCode() => FirstName.GetHashCode() ^ LastName.GetHashCode();
}
\ No newline at end of file