|
|||||||||
| PREV PACKAGE NEXT PACKAGE | FRAMES NO FRAMES | ||||||||
ITuner interface.
See:
Description
| Interface Summary | |
|---|---|
| ITuner | A tuner is a kind of radio that allows the user to adjust the current frequency up or down or to seek the next station with an adequate signal strength. |
| Class Summary | |
|---|---|
| Radio | A very simple radio that allows the frequency to be adjusted and provides a measure of the signal strength of the station being received, if there is one. |
| RadioGUI | A graphical user interface (GUI) for an AM/FM radio. |
| SampleTuner | A class implementing ITuner, to be used to demonstrate
the code students are to write to work with RadioGUI. |
Provides a graphical user interface (GUI) for an AM/FM radio using two instances of
a student-written class implementing the
ITuner interface.
The GUI appears like this:
A typical main method to run this program would be
import becker.xtras.radio.*;
public class Demo extends Object
{
public static void main(String[] args)
{ // Create two tuners for the radio. AM radios
// use frequencies from 530 to 1710 in steps of 10.
// FM radios use frequencies from 87.5 to 107.9 in
// steps of 0.1
ITuner am = new Tuner(530.0, 1710.0, 10);
ITuner fm = new Tuner(87.5, 107.9, 0.1);
RadioGUI gui = new RadioGUI(am, fm);
}
}
where Tuner is written by the student and implements the ITuner interface.
|
|||||||||
| PREV PACKAGE NEXT PACKAGE | FRAMES NO FRAMES | ||||||||