-
-
Save pawelpluta/3e94dca22dc6c4f4b1d7653b37f00f6f to your computer and use it in GitHub Desktop.
Article: The OOP has been explained wrongly to you
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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