cz.muni.fi.pb162.radio
Class Radio

java.lang.Object
  extended by cz.muni.fi.pb162.radio.Radio

public class Radio
extends java.lang.Object

FM radio with switch, speaker, one line 20 characters long display

Version:
8.10.2009
Author:
žuboš Pecho, tomorrow@mail.muni.cz .

Constructor Summary
Radio(int maxVolume)
          Constructor that creates new radio with its all parts
 
Method Summary
 void decreaseVolume()
          Decreases the volume of the radio by one point
 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

Radio

public Radio(int maxVolume)
Constructor that creates new radio with its all parts

Parameters:
maxVolume - the desired maximal volume of the radio
Method Detail

decreaseVolume

public void decreaseVolume()
Decreases the volume of the radio by one point


increaseVolume

public void increaseVolume()
Increases the volume of the radio by one point


setFrequency

public void setFrequency(double frequency)
Sets the frequency, on which the radio should receive signal. Negative frequencies are ignored

Parameters:
frequency -

turnOff

public void turnOff()
Turns the radio off


turnOn

public void turnOn()
Turns the radio on