Skip to content

Update Head.java#5

Open
yann-gael wants to merge 1 commit intosinghsatnam:masterfrom
yann-gael:yann-gael-patch-4
Open

Update Head.java#5
yann-gael wants to merge 1 commit intosinghsatnam:masterfrom
yann-gael:yann-gael-patch-4

Conversation

@yann-gael
Copy link

Does it make sense to have a count of "heads" in one instance of the Head class?
If an individual could have more than one head, then it should be the Person class (or similar) that knows it, not the Head class.
Also, all "body parts" could derive from a common superclass BodyPart that could factor out common code.

Does it make sense to have a count of "heads" in one instance of the Head class?
If an individual could have more than one head, then it should be the Person class (or similar) that knows it, not the Head class.
Also, all "body parts" could derive from a common superclass BodyPart that could factor out common code.
@singhsatnam
Copy link
Owner

I concur with both the changes. This requires creating a list of body parts maintained in "person". Also, using "setters" for each body part to add additional instances of body parts to the respective list.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants