CS 101 - Introduction to Computing, Spring 2011

Lab 14

In this lab, you will take the Sound File preamble.wav and create a new sentence from those words.

The sentence you are to create is:

We insure the common order to secure for the people more liberty.

The entire text of the Preamble is:

We the People of the United States, in Order to form a more perfect Union, establish Justice, insure domestic Tranquility, provide for the common defence, promote the general Welfare, and secure the Blessings of Liberty to ourselves and our Posterity, do ordain and establish this Constitution for the United States of America.
Make sure the you include some break/silence between the words of your newly created sentence.

To break the original sound into word, we need to know the starting and ending indices of the words. According to page 300 in our text book, the following words from the beginning of the Preamble can be found at the given indices from preamble10.wav:

WordStarting
Index
Ending
Index
We015,730
the15,73017,407
People17,40726,726
of26,72631,131
the31,13133,413
United33,41340,052
States40,05255,510

For this lab, you may want to use the code from

Lab Assignment 14

Due: Thursday 4/28/2011 by 11:59 pm

Create a Java program that will:

  1. Be writen using good programming style which includes:

  2. Contain the main() method that will

  3. Use at least two other methods:

  4. You are also to submit the Java file electronically via the assignment link for Lab 14 in BLackboard.

Here are some example sound files you can use with this assignment.