can anyone help with code for this, totally confused.
should specify the following methods.
togglePower() – a public method that takes no argument and returns no result.
Its purpose is to switch the receiver 'on' (true) if it is currently 'off' (false) and if
the energy level of the receiver is greater than 0, and switch the receiver 'off'
(false) if it is currently 'on' (true).
chargeFor() – a public method that takes a single argument of type int called
numberMinutes and returns a value of type int as result. A charging operation
for the amount of time specified by the argument is attempted. The energy level of
the receiver is returned as the result.
cleanTo() – a public method that takes an int argument called aPosition and
returns a value of type boolean as result. A cleaning operation starting at the
current position of the receiver and finishing at the position given by the argument is
attempted. The method returns true if the receiver is able to complete the cleaning
operation, and false otherwise.