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