Skip to content

Instantly share code, notes, and snippets.


pawelpluta/ Secret

Last active Oct 8, 2020
What would you like to do?
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