Skip to content

Conversation

howitzerg
Copy link

Create new Contact class - parent class of Address, Email and Phone classes.

Extract common variables and methods.

…lasses.

Extract common variables and methods.
Copy link

@ysqty ysqty left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All in all a good attempt at implementing Inheritance.

&& this.value.equals(((Phone) other).value)); // state check
}

@Override
Copy link

@ysqty ysqty Sep 17, 2016

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What's the rationale behind overriding the hashCode() method? Or did you forget to remove this?

}

@Override
public int hashCode() {
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

hmm..the value variable does not exist in your Phone class already. Can this class file still compile?

@ysqty ysqty added the Reviewed label Sep 17, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants