public override string ToString() { Coach c1 = new Coach(); if (Coach == null) { c1.Name = ""; } else { c1.Name = coach.Name; } string result = $"Name: {name}\nAddress: {address.Street}, {address.City}, {address.Province}, {address.PostalCode}\nTelephone Number: {phoneNumber}\nRegistration Number: {clubNumber}\nSwimmmers:\n {ClubMembers()}\nCoaches: {c1.Name}\n"; return(result); }
public void AddCoach(Coach coach) { Coach = coach; coach.Club = new Club(this.ClubNumber, this.Name, this.Address, this.PhoneNumber); }