Assignment 6 – Wacky Sentences
Maximum Points = 50
(Due before class on November 14, 2007) The purpose of this assignment is to use loops and arrays in Java to manipulate sounds. In this assignment, you will use:
“Wacky Sentences”” are sentences of three of more words that are randomly constructed from at least three lists of words. Your program is going to create one or more wacky sentences.
Write a Java program that
NOTE 1: Make sure the Sound holding the “sentence” is “big” enough to hold the combined words. Remember to include “silence” between words.
NOTE 2: Your program will need to use the Scanner class to read the data from each file:
Scanner scan = new Scanner (new File(fileName));.
You will need to include throws IOException after each method that reads from a file. File I/O requires import java.io.*; in addition to import java.util.Scanner;
NOTE 3: You may need throws SoundException to handles the creation of the Sounds.
Submit the .java file containing your program.
Grades are determined using the following scale: