java.lang.Objectcz.muni.fi.pb162.radio.UniversalRadio
public class UniversalRadio
Universal radio that is possible to build from any parts, provided that they fit the requirements
Constructor Summary | |
---|---|
UniversalRadio(cz.muni.fi.pb162.radio.parts.Switchable radioSwitch,
cz.muni.fi.pb162.radio.parts.GivingSound speaker,
cz.muni.fi.pb162.radio.parts.Displayable display)
Constructs new instance of Universal radio made off given parts |
Method Summary | |
---|---|
void |
decreaseFrequency(double frequency)
Decreases the frequency by the given value |
void |
decreaseFrequency(int frequency)
Decreases the frequency by the given value |
void |
decreaseVolume()
Decreases the volume of the radio by one point |
void |
increaseFrequency(double frequency)
Increases the frequency by the given value |
void |
increaseFrequency(int frequency)
Increases the frequency by the given value |
void |
increaseVolume()
Increases the volume of the radio by one point |
void |
setFrequency(double frequency)
Sets the frequency, on which the radio should receive signal. |
void |
turnOff()
Turns the radio off |
void |
turnOn()
Turns the radio on |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public UniversalRadio(cz.muni.fi.pb162.radio.parts.Switchable radioSwitch, cz.muni.fi.pb162.radio.parts.GivingSound speaker, cz.muni.fi.pb162.radio.parts.Displayable display)
radioSwitch
- speaker
- display
- Method Detail |
---|
public void decreaseFrequency(double frequency)
decreaseFrequency
in interface cz.muni.fi.pb162.radio.SignalReceiver
frequency
- the value, by which should be the frequency decreasedpublic void decreaseFrequency(int frequency)
decreaseFrequency
in interface cz.muni.fi.pb162.radio.SignalReceiver
frequency
- the value, by which should be the frequency decreasedpublic void decreaseVolume()
decreaseVolume
in interface cz.muni.fi.pb162.radio.Radio
public void increaseFrequency(double frequency)
increaseFrequency
in interface cz.muni.fi.pb162.radio.SignalReceiver
frequency
- the value, by which should be the frequency increasedpublic void increaseFrequency(int frequency)
increaseFrequency
in interface cz.muni.fi.pb162.radio.SignalReceiver
frequency
- the value, by which should be the frequency increasedpublic void increaseVolume()
increaseVolume
in interface cz.muni.fi.pb162.radio.Radio
public void setFrequency(double frequency)
setFrequency
in interface cz.muni.fi.pb162.radio.SignalReceiver
frequency
- public void turnOff()
turnOff
in interface cz.muni.fi.pb162.radio.Device
public void turnOn()
turnOn
in interface cz.muni.fi.pb162.radio.Device