Programming with Microsoft Visual Basic 2017
8th Edition
ISBN: 9781337102124
Author: Diane Zak
Publisher: Cengage Learning
expand_more
expand_more
format_list_bulleted
Textbook Question
Chapter 9, Problem 6RQ
What type of object is created by the OpenText method?
- a. File
- b. SequenceReader
- c. StreamWriter
- d. None of the above.
Expert Solution & Answer
Want to see the full answer?
Check out a sample textbook solutionStudents have asked these similar questions
create an image file programmatically. Your image file should be called OnTheFlyPy.ppm and the code you write to create should be in a public static void makePPM() method defined in the provided Main.java class.
Your OnTheFlyPy.ppm should be be 100 pixels wide and 100 pixels tall and the PPM header lines should be correct.
The first two rows and last two rows in the OnTheFlyPy.ppm should be red (Red=255, Green=0, Blue= 0).
The first two columns and last two columns in the OnTheFlyPy.ppm (except for the part that overlaps with the red pixels you created in the previous part) should should be blue (Red=0, Green=0, Blue= 255).
The remaining pixels in your OnTheFlyPy.ppm image should be white (Red=255, Green=255, Blue= 255). Here is a picture of what your final image should look like:
import java.io.*;
public class Main{ public static void main(String[] args) { makePPM(); } public static void makePPM() {
} }
Write a program in Python that uses tkinter to display a window with 3 fields asking a user for their email, first name, and last name. Add 1 button named 'submit' that will open a file called 'subscription.txt' and append the three values to the end of the file.
Q1.Write a GUI program to let the user enter a file name from an entry field and then count the number of occurrences of each letter in that file. Clicking the Show Result button displays the result in a text widget. You need to display a message in a message box if the file does not exist.
Q2.Revise the preceding exercise to display a histogram for the result, as shown in the figure below. You need to display a message in a message box if the file does not exist.
PYTHON ONLY!! Thank you! Also, could you add some explanations of your code please.
Chapter 9 Solutions
Programming with Microsoft Visual Basic 2017
Ch. 9 - Which of the following opens the employ.txt file...Ch. 9 - If the file to be opened exists, which method...Ch. 9 - Which of the following reads a line of text from a...Ch. 9 - What type of object is created by the OpenText...Ch. 9 - Prob. 7RQCh. 9 - The horizontal line in a menu is called _____.
a...Ch. 9 - Prob. 9RQCh. 9 - Prob. 10RQCh. 9 - Prob. 11RQCh. 9 - Prob. 3E
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
- IN PYTHON PLEASE, THANK YOU!!!arrow_forwardwrite a program that lets a user display and modify pictures, add 4 button so that clicking a particular button will shift the image by a small amount in the north,,south, east or west direction inside the windows. also a menu bar with 2 menus: File and Image, the file menu should contain an open menu item that users can select to display JPEC and PNG files from the disk in the windows. the Image menu should contain these menu items: Robert, Shear, and Scale when user selects any one of the items, an input dialog box should display, in which the users can specify the rotation anglearrow_forwardWrite (JAVA) methods for Browser button and Paste button. Browse Button: When user clicks “Browse” Button, a file explorer should open so that user can select an image file. Selected image file must be converted according to the panel_1 size and display on the panel_1 and also file path should be shown on textfield (“txtPath”). Paste Button: When user clicks “Paste” Button, area selected from xmin, xmax, ymin, and ymax textfields will be copied from panel_1 and pasted (or show) in panel_2. Note: Write custom methods if required for your solution.arrow_forward
- Add three files of any type you choose—for example, word-processing documents,spreadsheets, or pictures.Create a new folder named test inside folder data and move your third file in this folder.Write an application that determines whether the first two files are located in the same folderas the third one. Test the program when the files are in the same folder (before moving thirdfile in test folder) and when they are not (after moving third file in test folder).Save the file as CompareFolders.java.Submit the data folder zipped along with CompareFolders.java.HINT: Use try/catch block, path class and its methods.Run a loop to check the name count.Output will look like: -Path for file1 is C:\Users\<your file path>\Lab9\TestData1.txtPath for file2 is C:\Users\<your file path>\Lab9\TestData2.txtPath for file3 is C:\Users\<your file path>\Lab9\TestData3.txtAll files are in the same folderPath for file1 is C:\Users\<your file path>\Lab9\TestData1.txtPath for file2 is…arrow_forwardIn Java, create a user interface that has a top bar that includes a menu. The menu should have four items. When the user selects the first menu option, then the date and time should be printed in a text box. When the user selects the second menu option, then the text box contents should be written to a text file named "log.txt." When the user selects the third menu item then the frame background color changes to random color hue of the color green. The menu option should display the initial random hue each time selected for a single execution of the program. See https://www.w3schools.com/colors/colors_picker.asp When the user selects the fourth menu option then the program exits. Thank youarrow_forward5arrow_forward
- 1. Complete the class code below and include a method named "search" that takes two String parameters, a string to search and the other a target string to search for in the first string. The search method will return an integer representing the number of times the search string was found. The string being searched is a super-string formed by joining all lines of a text file, so we might expect to get multiple hits with our method. HINT: walk the String in a loop and use .substring(start, end) to examine a target-sized segment of the input string for equality to your target word. public class WordSearch { public static void main(String[] args) { String fileName String target = "help"; Scanner fileln = new Scanner(new File(fileName)); "story.txt"; %D String story = while(fileln.hasNextLine()) { story += fileln.nextLine(); // Build a super-String } System.out.printIn("(" + target + ") found "+ search(story, target) + " times"); } /l method code here } // end of WordSearch classarrow_forwardI'm trying to use: import java.io.File; in java using Visual Studio Code. I write this line: File friends = new File("HelpMe.txt"); The text file is stored in the src folder which contains the code I'm using, but it says the file is not found. So I try this line: File friends = new File("G:\Data Structures\DataStructures2022\2022\src\HelpMe.txt"); //yes I know so many folder paths, I was half asleep when I was setting the program up This is the path of the text file and the code I'm using. It brings the message of "Invalid escape sequence" What am I doing wrong? Am I missing something, or forgotten?arrow_forwardWrite a program that displays a text file in a text area, as shownin Figure . The user enters a file name in a text field and clicks the Viewbutton; the file is then displayed in a text area.arrow_forward
- Build a csharp application that reads from a file and print out the contents of that file in another files words by words (i.e. one word each line)arrow_forwarda program that demonstrates a label that includes a graphic. It creates a label that displays the string "Hourglass" and shows the image of an hourglass 1 at is loaded from the hourglass.png file..arrow_forwardThe is a container that can store a number of pictures at the same time.arrow_forward
arrow_back_ios
SEE MORE QUESTIONS
arrow_forward_ios
Recommended textbooks for you
- Programming with Microsoft Visual Basic 2017Computer ScienceISBN:9781337102124Author:Diane ZakPublisher:Cengage LearningEBK JAVA PROGRAMMINGComputer ScienceISBN:9781305480537Author:FARRELLPublisher:CENGAGE LEARNING - CONSIGNMENTProgramming Logic & Design ComprehensiveComputer ScienceISBN:9781337669405Author:FARRELLPublisher:Cengage
- EBK JAVA PROGRAMMINGComputer ScienceISBN:9781337671385Author:FARRELLPublisher:CENGAGE LEARNING - CONSIGNMENT
Programming with Microsoft Visual Basic 2017
Computer Science
ISBN:9781337102124
Author:Diane Zak
Publisher:Cengage Learning
EBK JAVA PROGRAMMING
Computer Science
ISBN:9781305480537
Author:FARRELL
Publisher:CENGAGE LEARNING - CONSIGNMENT
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
Files & File Systems: Crash Course Computer Science #20; Author: CrashCourse;https://www.youtube.com/watch?v=KN8YgJnShPM;License: Standard YouTube License, CC-BY
UNIX Programming (Part - 10) The File System (Directories and Files Names); Author: ITUTEES;https://www.youtube.com/watch?v=K35faWBhzrw;License: Standard Youtube License