-
Notifications
You must be signed in to change notification settings - Fork 3
Implement Relationships #2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: Amy
Are you sure you want to change the base?
Conversation
|
|
||
| private string _name; | ||
| private Gender _gender; | ||
| public Gender _gender; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For this exercise, I won't allow this to become public. It's possible to pass all the tests without accessing this, or casting IPerson -> Person in the other code. Use the getSisters() and getBrothers() methods to achieve this.
| // Brother or Sister | ||
| if (IsSibling(person, relative)) | ||
| { | ||
| var personImpl = person as Person; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not going to allow this as we are pretending that we can only access through the IPerson interface from the Relationships class
| var siblingsOfMother = GetSiblings(mother); | ||
| if (siblingsOfMother.Contains(relative)) | ||
| { | ||
| var personImpl = relative as Person; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ditto
| var siblingsOfFather = GetSiblings(father); | ||
| if (siblingsOfFather.Contains(relative)) | ||
| { | ||
| var personImpl = relative as Person; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ditto
No description provided.