Write a method to play a sound with the frequency changed 10 times.
What will be an ideal response?
```
/**
* Method to pl ay a sound 10 t imes and each t ime
* inc r e a s e the f r e quenc y . I t doesn ' t change
* the o r i g i n a l sound .
*/
public void play10Freq ( )
{
Sound s = nul l ;
// loop 10 t imes but s t a r t wi th 1 and end at 10
for ( int i = 1 ; i < 1 1 ; i++)
{
// r e s e t the sound
s = new Sound ( this . getFi leName ( ) ) ;
// change the f r e quenc y
s . changeFreq2 ( i ) ;
// pla y the sound
s . blockingPlay ( ) ;
}
}
```
You might also like to view...
Given that p1 is a pointer, p1++
a. always causes a run time error b. advances p1 by one unit of the type of variable to which p1 points c. adds 1 to whatever p1 is pointing to d. adds one element to the array that p1 is pointing to
Which of the following statements is false?
a. IntStream methods range and rangeClosed each produce an ordered sequence of int values. b. IntStream methods range and rangeClosed take two int arguments representing the range of values. c. Method range produces a sequence of values from its first argument up to its second argument. d. Method rangeClosed produces a sequence of values including both of its arguments.
Answer the following statements true (T) or false (F)
1. XHTML is the proposed successor to HTML. 2. Tim Berners-Lee and two other individuals created SGML. 3. Parsers are software programs that process XML documents. 4. Cascading Style Sheets technology allows you to specify the style of your page elements (spacing, margins, etc.) separately from the structure of your document (section headers, body text, links, etc.).
The World Wide Web Consortium (W3C) is the one group responsible for the web.
Answer the following statement true (T) or false (F)