public override bool Equals(System.Object otherCity) { if (!(otherCity is City)) { return(false); } else { City newCity = (City)otherCity; bool nameEquality = (this.GetCityName() == newCity.GetCityName()); return(nameEquality); } }