Class:Player
Object:A .wav file player.
Methods or Operations:
void play() - plays the .wav file.
void rewind() - rewinds the .wav file and starts playing the file again.
void stop() - stops playing the .wav file (but does not rewind).
Declaration and initialization:
Player player = new Player("crescendo.wav"); //Player ready to play wav file.
Example:public static void main(String[] args) { Player player = new Player("crescendo.wav"); player.play(); }
This will play the .wav file crescendo.wav. Note the file must be in the same directory as the program that you are executing.