electronics
Class Television

java.lang.Object
  |
  +--electronics.Television

public class Television
extends java.lang.Object

The Television class is used to represent a standard TV that contains a channel and volume setting. This particular javadoc comment will appear at the beginning of the documentation page.

Version:
1.2
Author:
Rich Raposa

Field Summary
 int channel
          The channel field represents the current channel being watched.
 
Constructor Summary
Television()
          Constructs a Television object with a channel of 4 and volume 5.
Television(int c, int v)
          Constructs a Television object with a channel c and volume v.
 
Method Summary
 int getVolume()
          Accessor method for the volume field.
 void setVolume(int v)
          Changes the volume as long as the parameter is a value between 0 and 10.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

channel

public int channel
The channel field represents the current channel being watched.

Constructor Detail

Television

public Television()
Constructs a Television object with a channel of 4 and volume 5.


Television

public Television(int c,
                  int v)
Constructs a Television object with a channel c and volume v.

Parameters:
c - The initial channel.
v - The initial volume.
Method Detail

getVolume

public int getVolume()
Accessor method for the volume field.

Returns:
The current volume.

setVolume

public void setVolume(int v)
Changes the volume as long as the parameter is a value between 0 and 10.

Parameters:
v - The new volume of the television. This value should be between 0 and 10.