(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)
- A: Put (T) or (F) and correct the false for the following: 1. A constant is a space in memory filled with data. 2. Variable name can be repeated for other values. 3. Textbox is used for input only. 4. If we don't determine the step value in loop statement, then the assumed value is 3. 5. If block is without end if. 6. Timer returns the time in second. 7. Shape has events like other toolsarrow_forwardThis is the file :arrow_forwardPart 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
- Hw8/file upload question / 1. Chapter16: video player (Button) Write a video player. The program has two buttons to play the videos. When video1" is clicked, a video plays; when “video1" is clicked, anotehr video plays. (Hint: You can complete it by modifying the MediaDemo program) Example: MediaButton 。 X 记 猎办公 干地说道 鲁菜 中国八大菜系 ... 鲁菜,是起源于山东省淄博市博山区的齐鲁风味(现通 行地带不仅限于当代的山东省。以大连菜为代表的辽南 菜系也属于鲁菜),是中国传统四大菜系(也是八大菜 系)中唯一的自发型菜系(相对于淮扬、川、粤等影响 型菜系而言),是历史最悠久、技法最丰富、难度最高 最见功力的菜系之一 熊猫办公 MediaButton video video2 videol | videozarrow_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_forwardWhat happens if the file already exists when you open a file for output?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_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*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_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<<Write in Java>> - Challenge 7 File encryption is the science of writing the contents of a file in a secret code. Your encryption program should work like a filter, reading the contents of one file, modifying the data into a code, and then writing the coded contents out to a second file. The second file will be a version of the first file, but written in a secret code. Although there are complex encryption techniques, you should come up with a simple one of your own. For example, you could read the first file one character at a time, and add 10 to the character code of each character before it is written to the second file. - Challenge 8 Write a program that decrypts the file produced by the program in Programming Challenge 7. The decryption program should read the contents of the coded file, restore the data to its original state, and write it to another filearrow_forwardPython: Write a program (or use the interpreter) to open a file and print the length of the longest line in the file. (You can use the while loop example in section 4.3.1 as a guide to writing your program.) Paste your code into the text field.arrow_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