CS 140 - Homework 12 - Due Monday April 14

Write a Java program that plays a .wav file backards. Allow the user to choose a wave file to play backwards by using a dialog box (remember how you did this for pictures?). Test it on the sound file gettysburg.wav. Play a sound backwards by reversing the sample array and then play it. Another hint, you can create an empty sound file using the constructor that takes the number of samples as a parameter.For example,

  Sound sound = new Sound(1000);

The line above creates an empty sound with 1000 samples in it.

This program is a little more complicated and is worth two homework grades. It is not a long assignment in terms of the amount of code you need to write, you just need to think a little more. Write this program in a class named Homework12. Turn in both a printout and e-mail me your Java file Homework12.java as an attachment.