Starting Out with Java: From Control Structures through Objects (7th Edition) (What's New in Computer Science)
7th Edition
ISBN: 9780134802213
Author: Tony Gaddis
Publisher: PEARSON
expand_more
expand_more
format_list_bulleted
Textbook Question
Chapter 14, Problem 10MC
You use these two classes to play an audio file.
- a. Media and MediaPlayer
- b. Audio and AudioPlayer
- c. Sound and SoundPlayer
- d. LoadMedia and PlayMedia
Expert Solution & Answer
Want to see the full answer?
Check out a sample textbook solutionStudents have asked these similar questions
C++-OOP
Can you write the code without .txt file? Just display the output on windows console.
Write the code like following form:
class A{}
class B{}
class C.public A {
....
....
B objB;
friend input ();
}
int main(){
C objC[30];
cin...
cin...
Input(...)
objC[0].display;
}
Thank you.
The other half is in the photos
Read the paint program below carefully and complete the source code paint.cpp by:
1. write function “myInit” of your own where you must a) setup viewport, b)set clear color to black and clear window, and c) setup matrix mode and viewing
2. Create your right menu containing the following submenus and main entries:
a) color menu with eight entries “Red”, “Green”, “Blue”, “Cyan”, “Magenta”, “Yellow”, “White”, and “Black”
b) pixel menu with two entries “Increase pixel size” and “Decrease pixel size”
c) fill menu with two entries “Fill on” and “Fill off”
d) two main entries “clear” and “quit”
3. Compile and run the program. Your complete program must be able to draw line segments, rectangles, triangles, pixels with specified color. It must also be able to accept keyboard input and display the text on the screen when work in text mode.
/* paint.cpp */
#define LINE 1
#define RECTANGLE 2
#define TRIANGLE 3
#define POINTS 4
#define TEXT 5
#include…
You will create a new console application, using Visual Studio using C#, that you will call carscount. You will create a text file that will have 5 names of cars and then add one extra car by using push method. This file should be called car.txt and it should be placed inside the Debug folder of your carscount application. You will create a simple program to access this carscount file using streams. In a new line, a text that would say “There are X cars in the park” where X will be the number of lines (number of names of cars plus the extra one) you read from the carscount file. Output "There are 6 cars in the park”.
Chapter 14 Solutions
Starting Out with Java: From Control Structures through Objects (7th Edition) (What's New in Computer Science)
Ch. 14.1 - Prob. 14.1CPCh. 14.1 - Prob. 14.2CPCh. 14.1 - Prob. 14.3CPCh. 14.1 - Prob. 14.4CPCh. 14.1 - In what package is the Color class?Ch. 14.1 - Prob. 14.6CPCh. 14.1 - Prob. 14.7CPCh. 14.1 - Prob. 14.8CPCh. 14.1 - Prob. 14.9CPCh. 14.1 - Prob. 14.10CP
Ch. 14.1 - Prob. 14.11CPCh. 14.1 - Which of the following is not a subclass of the...Ch. 14.2 - Prob. 14.13CPCh. 14.2 - Prob. 14.14CPCh. 14.2 - Prob. 14.15CPCh. 14.2 - Prob. 14.16CPCh. 14.2 - Prob. 14.17CPCh. 14.2 - Prob. 14.18CPCh. 14.2 - Prob. 14.19CPCh. 14.2 - Prob. 14.20CPCh. 14.2 - Prob. 14.21CPCh. 14.3 - Prob. 14.22CPCh. 14.3 - Prob. 14.23CPCh. 14.3 - Prob. 14.24CPCh. 14.3 - Prob. 14.25CPCh. 14.3 - Prob. 14.26CPCh. 14.3 - Prob. 14.27CPCh. 14.3 - Prob. 14.28CPCh. 14.3 - Prob. 14.29CPCh. 14.3 - Prob. 14.30CPCh. 14.4 - What two classes do you use to play an audio file?Ch. 14.4 - Refer to your answer to Checkpoint 14.31. In what...Ch. 14.4 - Prob. 14.33CPCh. 14.4 - Prob. 14.34CPCh. 14.5 - What three classes do you use to play a video...Ch. 14.5 - Refer to your answer to Checkpoint 14.35. In what...Ch. 14.5 - Prob. 14.37CPCh. 14.6 - Prob. 14.38CPCh. 14.6 - Prob. 14.39CPCh. 14.6 - What type of event happens when the user presses...Ch. 14.6 - What KeyEvent method can you call to determine...Ch. 14.6 - Refer to your answer for Checkpoint 14.41. What...Ch. 14 - Line, Circle, and Rectangle are subclasses of...Ch. 14 - Prob. 2MCCh. 14 - Prob. 3MCCh. 14 - Prob. 4MCCh. 14 - Prob. 5MCCh. 14 - Prob. 6MCCh. 14 - Prob. 7MCCh. 14 - Prob. 8MCCh. 14 - This interpolator causes an animation to start...Ch. 14 - You use these two classes to play an audio file....Ch. 14 - Prob. 11TFCh. 14 - Prob. 12TFCh. 14 - True or False: If an ellipses X-radius and...Ch. 14 - Prob. 14TFCh. 14 - Prob. 15TFCh. 14 - Write a statement that instantiates the Line...Ch. 14 - Prob. 2AWCh. 14 - Prob. 3AWCh. 14 - Write code that does the following: Instantiates...Ch. 14 - Prob. 5AWCh. 14 - Prob. 6AWCh. 14 - Prob. 7AWCh. 14 - Prob. 8AWCh. 14 - Prob. 9AWCh. 14 - Prob. 10AWCh. 14 - Prob. 11AWCh. 14 - Prob. 1SACh. 14 - Prob. 2SACh. 14 - Prob. 3SACh. 14 - Prob. 4SACh. 14 - Prob. 5SACh. 14 - Prob. 6SACh. 14 - What RotateTransition class method do you use to...Ch. 14 - Prob. 8SACh. 14 - Prob. 9SACh. 14 - Prob. 10SACh. 14 - Prob. 11SACh. 14 - This Old House Use the basic shapes you learned in...Ch. 14 - Tree Age Counting the growth rings of a tree is a...Ch. 14 - Hollywood Star Make your own star on the Hollywood...Ch. 14 - Prob. 4PCCh. 14 - Solar System Use the Circle class to draw each of...Ch. 14 - Prob. 6PCCh. 14 - Prob. 7PCCh. 14 - Prob. 8PCCh. 14 - Coin Toss Write a program that simulates the...Ch. 14 - Lunar Lander The books online resources...Ch. 14 - Change for a Dollar Game The books online...Ch. 14 - Rock, Paper, Scissors Game Write a program that...
Additional Engineering Textbook Solutions
Find more solutions based on key concepts
(This is a variant of an exercise from Chapter 1.) Create a text file that contains the text " I hate programmi...
Absolute Java (6th Edition)
Write a loop that counts the number of space characters that appear in the String object str.
Starting Out with Java: From Control Structures through Objects (6th Edition)
Modify the Product_T table by adding an attribute QtyOnHand that can be used to track the finished goods invent...
Modern Database Management (12th Edition)
Solution to Programming Project 8.14 Given the following header: vectorstring split(string target, string delim...
Problem Solving with C++ (10th Edition)
Listed below are definitions of two classes that use inheritance, code for their implementation, and a main fun...
Problem Solving with C++ (9th Edition)
List each of the .NET components that allow an application to connect to, and work with, a database in the orde...
Starting out with Visual C# (4th Edition)
Knowledge Booster
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.Similar questions
- When coding a program that uses an input file, how would you create a new scanner object as on input file? The name of the input text file is critterinventory.txt.arrow_forwardYou will create a new console application, using Visual Studio using C#, that you will call carscount. You will create a text file that will have 5 names of cars. This file should be called car.txt and it should be placed inside the Debug folder of your carscount application. You will create a simple program to access this carscount file using streams. In a new line, a text that would say “There are X cars in the park” where X will be the number of lines (number of names of cars) you read from the carscount file. Then add one more car by appending it to the program added and the final message should say "There are 6 cars in the park”.arrow_forwardIf you double-click on a CSV file in Windowa Explorer, it open automatically in Excel, how else can you open a CSV file so that you can view the actual content of the file? a) Use the Text Import Wizard b) Open the file in Excel using file- open c) Use the data- Import - CSV option d) Open it in Notepad or another text editorarrow_forward
- The program should consist when after login successfully the image, name, nickname, favorite food and aritst will display after. When I run the code, the information wont display. The image will only display entirely. The code should consist of an image, name, favorite artist, favorite food, and favorite artist. ("random.jpg just appload a random pic to test) Code: from tkinter import *from tkinter import messageboxfrom PIL import ImageTk, Image# Create the main windowroot = Tk()root.title("Login")# Create the username label and entry fieldusername_label = Label(root, text="Username:")username_label.grid(row=0, column=0)username_entry = Entry(root)username_entry.grid(row=0, column=1)# Create the password label and entry fieldpassword_label = Label(root, text="Password:")password_label.grid(row=1, column=0)password_entry = Entry(root, show="*")password_entry.grid(row=1, column=1)# Create the login buttondef login():if username_entry.get() == "admin" and password_entry.get() ==…arrow_forwardAdd an object/variable each of the six blue codes. Possible objects/variables to choose from are: Scanner, outFile, outputName, String, File, out, in, PrintWriter, inputName, inFilearrow_forwardCreate a new text file using a notepad or any other software, The text file contains your name(first 8 chars) and the file must be exactly 8 bytes in size only and name it “your_ID.txt”.arrow_forward
- Create a code using Console.WriteLine for the attached photo.arrow_forwardAllow the user the choice of displaying either a random line or a random word from a file they specify. Your menu should allow them to choose these options either from the number of the option or from the capitalized letter. For example, 1) display random Word 2) display random Line 3) Quit Should allow the user to select a random line display by either entering the number 2 or by entering a letter L (lower or upper case!). C++ string classarrow_forwardThe output should be a text file with the final position and the facing direction (no GUI required)arrow_forward
- Describe the piece of the object that is known as the StreamWriter.arrow_forwardThe homework needs to be in Visual Studio :1)Where in the text box you can add by the button Add.2)Where you can open (by the button Open ) a file dialog by selecting a text file and all the contents should be display in the multiline box.3)Where you can save like a .textfile (by the button Save) a file dialog which all contents are in multiline box .arrow_forwardCan you fix and tell me what is wrong here? Its throwing errors. using System.Speech.Synthesis; namespace dropbox03{public partial class Form1 : Form{public Form1(){InitializeComponent();} private string fileContent;private void Form1_Load(object sender, EventArgs e){if (openFileDialog1.ShowDialog() == DialogResult.OK){string filePath = openFileDialog1.FileName;using StreamReader sr = new StreamReader(filePath);fileContent = sr.ReadToEnd();}} private void exitButton_Click(object sender, EventArgs e){this.Close();} private void playButton_Click(object sender, EventArgs e){string sentences = fileContent.Split(".");SpeechSynthesizer synthesizer = new SpeechSynthesizer();synthesizer.SetOutputToDefaultAudioDevice();foreach(string sentence in sentences){sentenceLabel.Text = sentence;synthesizer.Speak(sentenceLabel.Text);}}}}arrow_forward
arrow_back_ios
SEE MORE QUESTIONS
arrow_forward_ios
Recommended textbooks for you
- Programming Logic & Design ComprehensiveComputer ScienceISBN:9781337669405Author:FARRELLPublisher:CengageEBK JAVA PROGRAMMINGComputer ScienceISBN:9781337671385Author:FARRELLPublisher:CENGAGE LEARNING - CONSIGNMENTProgramming with Microsoft Visual Basic 2017Computer ScienceISBN:9781337102124Author:Diane ZakPublisher:Cengage Learning
Programming Logic & Design Comprehensive
Computer Science
ISBN:9781337669405
Author:FARRELL
Publisher:Cengage
EBK JAVA PROGRAMMING
Computer Science
ISBN:9781337671385
Author:FARRELL
Publisher:CENGAGE LEARNING - CONSIGNMENT
Programming with Microsoft Visual Basic 2017
Computer Science
ISBN:9781337102124
Author:Diane Zak
Publisher:Cengage Learning
C - File I/O; Author: Tutorials Point (India) Ltd.;https://www.youtube.com/watch?v=cEfuwpbGi1k;License: Standard YouTube License, CC-BY
file handling functions in c | fprintf, fscanf, fread, fwrite |; Author: Education 4u;https://www.youtube.com/watch?v=aqeXS1bJihA;License: Standard Youtube License