|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--electronics.Television
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.
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 |
public int channel
Constructor Detail |
public Television()
public Television(int c, int v)
c
- The initial channel.v
- The initial volume.Method Detail |
public int getVolume()
public void setVolume(int v)
v
- The new volume of the television. This value
should be between 0 and 10.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |