Skip to content

Conversation

@wilsonjimenez
Copy link

No description provided.

Podrías renombrar quantity por balance.
No quieres que un programador usando esta clase modifique el owner ni el saldo
return quantity;
}

public void setQuantity(double quantity) {
Copy link
Owner

Choose a reason for hiding this comment

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

Why would you remove this method if it's being used in withdrawQuantity method?

Copy link
Author

Choose a reason for hiding this comment

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

because it is a public method. You are allowing the clients of this class to set any value here.

Copy link
Owner

Choose a reason for hiding this comment

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

image

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