-
-
Save pawelpluta/d0baada1851b7d0ed8c13541108f91fa to your computer and use it in GitHub Desktop.
Article: The OOP has been explained wrongly to you - solution
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 WashingService { | |
private static final BigDecimal MAX_LAUNDRY_WEIGHT = BigDecimal.valueOf(7); | |
Laundry washWool(WashingMachine washingMachine, | |
Laundry laundry, | |
Integer spinSpeed, | |
Integer temperature) { | |
Laundry laundryToBeDone = maximumLoadFrom(laundry); | |
washingMachine.setLaundry(laundryToBeDone); | |
washingMachine.setProgramme(new Programme(temperature, spinSpeed)); | |
washingMachine.wash(); | |
return washingMachine.getLaundry(); | |
} | |
/* other wash method */ | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment