This file contains hidden or 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
| /* | |
| Вопрос: Как сделать так, чтобы при разряде или перезаряде | |
| батарея автоматически ограничивалась значениями 0 и 100? | |
| */ | |
| class Battery { | |
| int charge = 100; | |
| public void drain(int amount) { |