(Play, loop, and stop a sound clip) Write a
■ Get an audio file from the class directory using AudioClip.
■ Place three buttons labeled Play, Loop. and Stop, as shown in Figure 16.46a.
■ If you click the Play button, the audio file is played once. If you click the Loop button, the audio file keeps playing repeatedly. If you click the Stop button, the playing stops.
Want to see the full answer?
Check out a sample textbook solutionChapter 16 Solutions
Introduction to Java Programming and Data Structures, Comprehensive Version (11th Edition)
Additional Engineering Textbook Solutions
C Programming Language
Starting out with Visual C# (4th Edition)
Starting Out with Java: From Control Structures through Data Structures (3rd Edition)
Starting Out with Python (4th Edition)
Java How to Program, Early Objects (11th Edition) (Deitel: How to Program)
Web Development and Design Foundations with HTML5 (9th Edition) (What's New in Computer Science)
- Part III Write a program that gets integer input from user until the user gives a value bigger than 50 by using while loop. Note: Do not compress your files, submit only java files. Note: Do not forget to justify your answers with comments.arrow_forward(Remove text) Write a program that removes all the occurrences of a specified string from a text file. (For example, my mother went to buy groceries while John and I play Call of duty.) removes the string John from the file. You should create a file with a paragraph. removes the string "John and" from the file. Note:- Please write a java code and also need an output for this program. (Also, let me know with what name file should be saved to get output)arrow_forwardPython programming-basics homework assignment: Write a program that inputs a text file, should print unique words in file in abc order, uppercase words should take precedence over lower. this is example of output: example text file: brown dog fox jumps lazy over quick the example output: brown dog fox jumps lazy over quick the THis is MY output: thequickbrownfoxjumpsoverthelazydog This is my code: QUESTION: why it won't SORT or removing unique text like example output: # Put your code herefileName = input("Enter the input file name:")word_list = []with open(fileName) as words: for line in words: line.rstrip() for list_of_words in line.split(): print(list_of_words) word_list.sort() for list2_words in word_list: if list2_words not in word_list: word_list.sort() word_list.append(list_of_words) for new_words in line.split(): print(new_words)arrow_forward
- Example Execution Trace You must exactly match the below layout. Melcome to a fun word replacement game Enter the name of the file to use: examplel.txt Please give a name Mark Please give a place Drexe ї Please give a day of the week Friday Please give a time Please give a verb eat Please give an animal Please give a body part mouth Here is your story: Mark is having a party! It's going to be at Drexel on Friday. Please make sure to show up at noon, or else you will be required to eat a/an raccoon with your moutharrow_forwardPYTHON CODINGarrow_forwardWhat happens if the file already exists when you open a file for output?arrow_forward
- C compilerarrow_forwardC compilerarrow_forward3 Using a do while Loop Summary In this lab, you work with the same Java program you worked with in Labs 5-1 and 5-3. As in those earlier labs, the completed program should print the numbers O through 10, along with their values multiplied by 2 and by 10. However, in this lab you should accomplish this using a do while loop. Instructions 1.Ensure the file named NewestMultiply.java is open. 2. Write a do while loop that uses the loop control variable to take on the values O through 10. 3. In the body of the loop, multiply the value of the loop control variable by 2 and by 10. 4. Execute the program by clicking Run and verify that the output is correct. Grading When you have completed your program, click the Submit button to record your score. == ▬▬ NewestMultiply.java 1 // NewestMultiply.java 2 // with these values multiplied by 2 and by 10. 3 // Input: None. 4 // Output: Prints the numbers through 10 along with their values multiplied by 2 and by 10. 5 10 11 12 13 14 15 16 17 18 19 20…arrow_forward
- Write code that uses any type of loop. The code should continually ask for a user input and sums all user inputs that are divisible by 2. The loop should continue until the user enters a negative number. The code should output the sum a single time once user entry has completed. You may assume all libraries and namespaces have been previously written into the code, you are just writing everything that would go inside the main function (beyond the return 0:).arrow_forward*Code in Python Write a script named dif.py. This script should prompt the user for the names of two text files and compare the contents of the two files to see if they are the same. If they are, the script should simply output "Yes". If they are not, the script should output "No", followed by the first lines of each file that differ from each other. The input loop should read and compare lines from each file, including whitespace and punctuation. The loop should break as soon as a pair of different lines is found. Below are examples of the program input and output along with relevant files: one.txt: This is text. abc 123 sameAsOne.txt: This is text. abc 123 differentFromOne.txt This is text. xyz 123 Comparing files that are the same: Enter the first file name: one.txt Enter the second file name: sameAsOne.txt Yes Comparing files that are different: Enter the first file name: one.txt Enter the second file name: differentFromOne.txt No abc xyzarrow_forwardMatch the terms to their corresponding descriptions This loop structure can be used when the number of iterations is known or can be calculated. Choose... This loop structure can be used in any situation a loop is needed. Choose... This loop can be used whenever we need the user to explicitly indicate when the loop should "seeding" loop continue. "while" loop This loop can be used when the program expects a stream of values, and one these values "guarding" loop signals the end of the loop. Loop "condition" "infinite" loop "sentinel" loop Next page "user-confirmation" loop "for" looparrow_forward
- Database System ConceptsComputer ScienceISBN:9780078022159Author:Abraham Silberschatz Professor, Henry F. Korth, S. SudarshanPublisher:McGraw-Hill EducationStarting Out with Python (4th Edition)Computer ScienceISBN:9780134444321Author:Tony GaddisPublisher:PEARSONDigital Fundamentals (11th Edition)Computer ScienceISBN:9780132737968Author:Thomas L. FloydPublisher:PEARSON
- C How to Program (8th Edition)Computer ScienceISBN:9780133976892Author:Paul J. Deitel, Harvey DeitelPublisher:PEARSONDatabase Systems: Design, Implementation, & Manag...Computer ScienceISBN:9781337627900Author:Carlos Coronel, Steven MorrisPublisher:Cengage LearningProgrammable Logic ControllersComputer ScienceISBN:9780073373843Author:Frank D. PetruzellaPublisher:McGraw-Hill Education