Skip to content

Instantly share code, notes, and snippets.

@pawelpluta
Last active October 8, 2020 19:36
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save pawelpluta/3e94dca22dc6c4f4b1d7653b37f00f6f to your computer and use it in GitHub Desktop.
Save pawelpluta/3e94dca22dc6c4f4b1d7653b37f00f6f to your computer and use it in GitHub Desktop.
Article: The OOP has been explained wrongly to you
class WashingMachine {
private Integer temperature;
private Integer spinSpeed;
private Collection<LaundryElement> laundry;
// constructor, getters and setters
void wash() {
laundry.forEach(laundryElement -> laundryElement.setDirty(false));
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment