Programming with Microsoft Visual Basic 2017
8th Edition
ISBN: 9781337102124
Author: Diane Zak
Publisher: Cengage Learning
expand_more
expand_more
format_list_bulleted
Concept explainers
Textbook Question
Chapter 9, Problem 1RQ
Which of the following opens the employ.txt file and allows the computer to write new data to the end of the file’s existing data?
- a. outFile = I0.File.AddText("employ.txt")
- b. outFile = I0.File.AppendText("employ.txt")
- c. outFile = I0.File.InsertText("employ.txt")
- d. outFile = I0.File.WriteText("employ.txt")
Expert Solution & Answer
Want to see the full answer?
Check out a sample textbook solutionStudents have asked these similar questions
Lesson: Visual BasicTopic: Data Files
Create an inputfile named "inputFile.txt" (use "Note Pad") that contains the following data. Be sure that the last line of the file is empty (i.e., not even a space character). In other words, after entering the second line of data, press the <ENTER> key, save the file, then exit the editor.
5 10 6 923 7 13 40
Implement the following algorithm
Create & Open inputFileCreate & Open outputFileRead first line of data into variables a, b, c, dDOWHILE !EOF Create a unique formula that uses the variables a, b, c, & d. For example, value = (a*a) + b - c + d Output value into outputFile Read each line of data into variables a, b, c, dENDDOClose inputFileClose outputFile
Post the source code (embed the code in your response; DO NOT ATTACH THE C++ FILE).
Use python language for a program that modifies and sorts the content of a specific csv file based on the inputted column name. The program should ask Enter filename: Enter column name to be sorted: Additionally, the csv file must be modified and no additional csv files must be created. The application will catch and display an error message "the file does not exist" if the csv file does not exist. *if possibe, do not use pandas*
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
- CODE IN PYTHON PLEASE The objective is to create a code in Python that can extract the columns highlighted in blue (Column T and AB3) and output them to a .txt file. The code should be able to generate the text file with the columns that are highlighted in blue and store them on a separate folder. Below shows how the Test.xlsm file looks like as well as how the text file should look like when the code extracts and outputs it. Google drive to access Test.xlsm file: https://drive.google.com/drive/folders/16utzb5_h7yMCN8_13E_JqasfcpykZOYr?usp=sharing What my code outputs is shown in the picture (O1.png) What I would like for my code to output is the columns next to each other (Right Example.png) The current code is able to output Columns T and AB3 but I am not able to output them next to each other as shown above. We would also like for the code to be capable of storing the text file to a separate folder. Below is the code I have been working on. #package to read xlsm file import openpyxl…arrow_forwardCreates a sales receipt, displays the receipt entries and totals, and saves the receipt entries to a file .Prompt the user to enter the - Item Name Item Quantity Item Price Display the item name, the quantity, and item price, and the extended price (Item Quantity multiplied by Item Price) after the entry is made Save the item name, quantity, item price, and extended price to a file When you create the file, prompt the user for the name they want to give the file Separate the items saved with commas Each entry should be on a separate line in the text file Ask the user if they have more items to enter Once the user has finished entering items Close the file with the items entered Display the sales total If the sales total is more than $100 Calculate and display a 10% discount Calculate and display the sales tax using 8% as the sales tax rate The sales tax should be calculated on the sales total after the discount Display the total for the sales receiptarrow_forwardSlide Type Slide • Exercise # 4 A hotel salesperson enters sales in a text file. Each line contains the following, separated by semicolons: • The name of the client, the service sold (such as Dinner, Conference, Lodging, and so on), • The amount of the sale, and the date of that event. • Write a program that reads such a file and displays the total amount for each service category. Display an error if the file does not exit or the format of the record is incorrect. No need to display anything else in this regard. Note that you can assume that the dates are entered correctly (no need to validate them). You may also assume that the name of the input text file is inputex4.txt. • Make sure you use a dictionary in your solution. • Sample run is included below for the given input file inputex4.txt Summary of total sales according to services Dinner 634.75 Conference 1133.25 Lodging Dinner and Lodging 550.25 625.14 Slide Tyne Fragment varrow_forward
- A student wants to write into a file called myfile, without deleting its existing content. Which one of the following functions should he or she use? f = open('myfile', 'r') f = open('myfile', 'w+b') f = open('myfile', '+') f = open('myfile', 'a')arrow_forwardUsing C# language please in Visual Studio 2022 in Windows Form App. As for the folder-- for convenience sake-- create some folders and insert a couple of names in there, not 200.arrow_forwardCoose corect option: q. _________________ is used to open the sequential file access for append. a) CreateText method b) AppendText method c) OpenText method d) WriteText methodarrow_forward
- write the code to lookup, add and remove phoneentries from the phonebook text file . These are the code we use for the lookup, add and remove in the case statement.(Lookup)# Look someone up in the phone bookgrep $1 phonebook (add)echo "$1 $2" >> phonebooksort -o phonebook phonebook (Remove)grep -v "$1" phonebook > /tmp/phonebookmv /tmp/phonebook phonebook Write a complete Bash script which will accept up to three command-line arguments: the first one is either (lookup, add or remove), the second one is a name enclosed in single quotes and the third one (if doing an add) is a phone number enclosed in single quotes. Using a case statement to match on either lookup, add or remove, the script should then perform the requested operation. Again here, you should first check for null arguments before continuing with the rest of the script or requested operation. In addition, the person may not be in the phonebook for lookup or remove so, you need to account for this.arrow_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_forwardUsing C++ Language Create a file called input9B.txt and type (or copy) the following text exactly as it appears below into that file. You may cut and paste the following 7 blue lines (including the blank line between the two paragraphs) into that file: C++ is a cross-platform language that can be used to create high-performance applications. C++ was developed by Bjarne Stroustrup, as an extension to the C language. C++ gives programmers a high level of control over system resources and memory. C++ is one of the world's most popular programming languages. C++ can be found in today's operating systems, Graphical User Interfaces, and embedded systems. C++ is an object-oriented programming language which gives a clear structure to programs and allows code to be reused, lowering development costs. Compile and run the program, using the input9B.txt file as the input file. Did this program produce the same exact output as shown above? What do you think the problem is? The problem is…arrow_forward
- Pythonarrow_forwardShould not be case sensitive when getting the column name. Use python language for a program that modifies and sorts the content of a specific csv file based on the inputted column name. The program should ask Enter filename: Enter column name to be sorted: Additionally, the csv file must be modified and no additional csv files must be created. The application will catch and display an error message "the file does not exist" if the csv file does not exist.arrow_forwardUsing Java, Write an interactive console application for an employee management service. The user can enter the following options for the apps 1-List all employees, sorted by Name. 2-Hire a new employee (add to list) 3-show the lowest salary and highest salary and average of the salaries 0-exit - At the beginning of the application, data will be read from a text file. - And at the end of it when user chooses 0, data will be saved to the same file. - The date format needs to be YYYY-MM-DD and The fields needs to be separated by semicolon(;) Example of data in the text file : Alice P.;2012-09-22;Shoes;40 Emma W.;2016-07-07;Furniture;30 Eva;2021-08-08;Pizza;50 EmployeeSchedule class has the following attributes private String name; private String department; private Date dateHired; private double hourSalary; name : between 2-50 characters and not permitted to have ;^?@!~* department : between 2-50 characters and not permitted to have ;^?@!~* dateHired : between 1900 and 2100 salary :…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 LearningMicrosoft Visual C#Computer ScienceISBN:9781337102100Author:Joyce, Farrell.Publisher:Cengage Learning,EBK JAVA PROGRAMMINGComputer ScienceISBN:9781337671385Author:FARRELLPublisher:CENGAGE LEARNING - CONSIGNMENT
- Programming Logic & Design ComprehensiveComputer ScienceISBN:9781337669405Author:FARRELLPublisher:CengageC++ Programming: From Problem Analysis to Program...Computer ScienceISBN:9781337102087Author:D. S. MalikPublisher:Cengage LearningCOMPREHENSIVE MICROSOFT OFFICE 365 EXCEComputer ScienceISBN:9780357392676Author:FREUND, StevenPublisher:CENGAGE L
Programming with Microsoft Visual Basic 2017
Computer Science
ISBN:9781337102124
Author:Diane Zak
Publisher:Cengage Learning
Microsoft Visual C#
Computer Science
ISBN:9781337102100
Author:Joyce, Farrell.
Publisher:Cengage Learning,
EBK JAVA PROGRAMMING
Computer Science
ISBN:9781337671385
Author:FARRELL
Publisher:CENGAGE LEARNING - CONSIGNMENT
Programming Logic & Design Comprehensive
Computer Science
ISBN:9781337669405
Author:FARRELL
Publisher:Cengage
C++ Programming: From Problem Analysis to Program...
Computer Science
ISBN:9781337102087
Author:D. S. Malik
Publisher:Cengage Learning
COMPREHENSIVE MICROSOFT OFFICE 365 EXCE
Computer Science
ISBN:9780357392676
Author:FREUND, Steven
Publisher:CENGAGE L
Linux - Tutorial for Beginners in 13 MINUTES! [ UPDATED ]; Author: bai;https://www.youtube.com/watch?v=BMGixkvJ-6w;License: Standard YouTube License, CC-BY
What is Linux?; Author: Techquickie;https://www.youtube.com/watch?v=zA3vmx0GaO8;License: Standard YouTube License, CC-BY
Introduction to Linux and Basic Linux Commands for Beginners; Author: sakitech;https://www.youtube.com/watch?v=IVquJh3DXUA;License: Standard Youtube License