Class Microwave
- java.lang.Object
-
- cz.cvut.fel.omo.SmartHome.devices.AbstractDevice
-
- cz.cvut.fel.omo.SmartHome.devices.action.AbstractActionDevice
-
- cz.cvut.fel.omo.SmartHome.devices.action.common.Microwave
-
- All Implemented Interfaces:
TurnableDevicesInterface
public class Microwave extends AbstractActionDevice implements TurnableDevicesInterface
-
-
Field Summary
-
Fields inherited from class cz.cvut.fel.omo.SmartHome.devices.action.AbstractActionDevice
deviceClassification, state
-
Fields inherited from class cz.cvut.fel.omo.SmartHome.devices.AbstractDevice
condition, consumption, deviceName, floor, instruction
-
-
Constructor Summary
Constructors Constructor Description Microwave(Floor floor, java.lang.String deviceName, int durationOfUsing, Consumption consumption)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
isEntertaining()
Determines if the child can use it or not.void
turnOff()
Method for turning device off.void
turnOn()
Method for turning device on.-
Methods inherited from class cz.cvut.fel.omo.SmartHome.devices.action.AbstractActionDevice
action, consume, isFree, isRightDevice, isUsageLimit, setState, updateDuration, usage
-
Methods inherited from class cz.cvut.fel.omo.SmartHome.devices.AbstractDevice
consumes, isBroken, repairDevice
-
-
-
-
Constructor Detail
-
Microwave
public Microwave(Floor floor, java.lang.String deviceName, int durationOfUsing, Consumption consumption)
-
-
Method Detail
-
isEntertaining
public boolean isEntertaining()
Description copied from class:AbstractDevice
Determines if the child can use it or not.- Specified by:
isEntertaining
in classAbstractDevice
- Returns:
- true if can false if not
-
turnOff
public void turnOff()
Description copied from interface:TurnableDevicesInterface
Method for turning device off.- Specified by:
turnOff
in interfaceTurnableDevicesInterface
-
turnOn
public void turnOn()
Description copied from interface:TurnableDevicesInterface
Method for turning device on. If device was broken before turning off, then it will broken after turning on.- Specified by:
turnOn
in interfaceTurnableDevicesInterface
-
-