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 10, Problem 1RQ
The name of a class file ends with which of the following filename extensions?
- a. .cla
- b. .cls
- c. .vb
- 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 a file in your project named employees.txt with the following data (you can simply create the file by hand rather than with Python code):
123 Bob Smith345 Anne Jones256 Carol Lee845 Steve Robert Anderson132 Jill Thompson
From your program's main function, give the user the following options: lookup a name based on ID number, lookup an ID number based on name, and quit the program.
OPTION 1: The user chooses to lookup a name based on ID number:
Use a try/except and ask the user to enter an integer.
If they don't enter an integer, print an error message.
If they do enter an integer, call a function named lookup_employee which takes the id as a parameter.
If an employee with the given id number is found, return the name.
Otherwise, return the string “Employee not found”
Back in main, print the return result.
OPTION 2: The user chooses to lookup an ID based on name:
Ask the user to enter the first and last name (don't ask for the middle name).
Call a function named…
In C++
For this assignment, you will create a system for users to review restaurants. To review a restaurant, the user needs to login to the system first. Create a file (you can do this by hand rather than through code) named 'users.txt' and add the following information to it:
User1 password steve mypassword reviewer 54321
Each line represents a user. The first word is their username and the second is their password.
At the start of your main function, call a function named login, which asks for a username and password. If you find a matching username/password pair in 'users.txt', return the username. Otherwise, ask the user to try again.
Back in main, assign the value returned from login to a variable. This will allow you to know which user is currently logged in. Next, build a while loop menu with the following options:
•Review a restaurant. Call a function named reviewRestaurant. Ask what restaurant the user wants to review and how many stars to give it. The star amount must be…
2. Name the demo file firstname_lastname_PE2
Create a program that simulates a dumpster diving game. Dumpster diving is when you search for loot in
large industrial sized trash bins. In the game you will roll a ten-sided dice to determine what the user
has received. Use the UML below as a guide for the Die class (Name the class Die.java).
Die
- sideUp: int = 10
- value: int
+ Die()
+ roll(): void
+ getvalue(): int
Below are some suggestions to aid you in designing the game:
• Each round of the game is performed as an iteration of a loop that repeats as long as the player
wants to "dive" for more items.
• At the beginning of each round, the program will ask the user whether or not he or she wants to
continue diving.
The program simulates the rolling of a ten-sided die
Each item that can be caught is represented by a number generated from the die; for example, 1
for "a half-eaten sandwich", 2 for "a left shoe", 3 for "a broken watch", and so on.
• Each item the user catches is worth a…
Chapter 10 Solutions
Programming with Microsoft Visual Basic 2017
Ch. 10 - The name of a class file ends with which of the...Ch. 10 - The Inventory class contains a Private variable...Ch. 10 - Prob. 4RQCh. 10 - Which of the following statements is false? a. A...Ch. 10 - A Private variable in a class can be accessed...Ch. 10 - Prob. 7RQCh. 10 - Which of the following is the name of the...Ch. 10 - Prob. 10RQCh. 10 - Prob. 11RQCh. 10 - Prob. 12RQ
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
- Each of the following files in the Chapter.10 folder of your downloadable student files has syntax and/or logical errors. In each case, determine the problem and fix the program. After you correct the errors, save each file using the same filename preceded with Fixed. For example, DebugTen01.cs will become FixedDebugTen01 .cs. a. DebugTen01.cs b. DebugTen02.cs c. DebugTen03.cs d. DebugTen04.csarrow_forwardEach of the following files in the Chapter.04 folder of your downloadable student files has syntax and/or logical errors. In each case, determine the problem, and fix the program. After you correct the errors, save each file using the same filename preceded with Fixed. For example, save DebugFour1.cs as FixedDebugFour1.cs. a. DebugFour1.cs b. DebugFour2.cs c. DebugFour3.cs d. DebugFour4.csarrow_forwardEach of the following files in the Chapter.05 folder of your downloadable student files has syntax and/or logical errors. In each case, determine the problem, and fix the program. After you correct the errors, save each file using the same filename preceded with Fixed. For example, save DebugFive1.cs as FixedDebugFive1 .cs. a. DebugFive1.cs b. DebugFive2.cs c. DebugFive3.cs d. DebugFive4.csarrow_forward
- Each of the following files in the Chapter.08 folder of your downloadable student files has syntax and/or logical errors. In each case, determine the problem, and fix the program. After you correct the errors, save each file using the same filename preceded with Fixed. For example, DebugEight1.cs will become FixedDebugEight1.cs. a. DebugEight1.cs b. DebugEight2.cs c. DebugEight3.cs d. DebugEight4.csarrow_forwardOutput to a file can be achieved with a _____ object, which is constructed with a File and has the same methods as System.out (the class name is case sensitive)(Just Words)arrow_forward1. Write a program that opens an output file with the filename my_name.txt, writes your name to the file, then closes the file. 2. Write a program that opens the my_name.txt file that was created by the program in problem 1, reads your name from the file, displays the name on the screen, then closes the file. Write code that does the following: opens an output file with the filename number_list.arrow_forward
- Part 1: In C#, Create a Class Called FileRoot As we know, when we run a program, the program runs from the bin folder. If I had a file stored at the root of the project and if the program is running, it wouldn't know where it is unless it came out of the bin folder. Before implementing the classes below, create a class that will help you get from the bin folder to the project's root. Hint: Directory class and its static methods would help here.arrow_forward9 Which header file has the functions scanf()? a. stdio.h b. string.h c. stdlib.h d. math.harrow_forwardWrite a C# program FileComparison that compares two files. Two files have been provided for you, Quote.txt and Quote.docx, both containing movie quotes and are located in the /root/sandbox/ directory Next write the file comparison application that displays the sizes of the two files as well as the ratio of their sizes to each other. To discover a file’s size, you can create a System.IO.FileInfo object using statements such as the following, where FILE_NAME is a string that contains the name of the file, and size has been declared as an integer: FileInfo fileInfo = new FileInfo(FILE_NAME); size = fileInfo.Length; Your program's output should look like the following: The size of the Word file is FILE_SIZE and the size of the Notepad file is FILE_SIZE The Notepad file is x% of the size of the Word filearrow_forward
- When writing C# code, how do you indicate a namespace? Question options: You must specify the namespace by using the "namespace" keyword, followed by the namespace. You must use the "declare namespace" keywords, followed by the namespace. You must utilize the using clause, or using directive, by specifying "using", followed by the namespace. You must use create a file called "namespaces", and include all namespace code in this file. Then, the namespace can be used by name in your program. Question 14arrow_forwardIN C++ VISUAL STUDIO Create two classes one to read data from file, and the other to write data into a file. The data can be about employees having information about employee name, id and designation. You must create a class for employee. There is a total of 3 classes in your program. In the second class, which is about file writing, you have to write data about 10 employees in file. You can get data from user. In reading class, you have to read information about a specific employee whose id is given by user. Finally write a function to show data about employees whose designation is “manager”.arrow_forwardin c # i need to Write the program FileComparison that compares two files. Two files have been provided for you, Quote.txt and Quote.docx, both containing movie quotes and are located in the /root/sandbox/ directory Note: you will not be able to see the Quote.docx file. Next write the file comparison application that displays the sizes of the two files as well as the ratio of their sizes to each other. To discover a file’s size, you can create a System.IO.FileInfo object using statements such as the following, where FILE_NAME is a string that contains the name of the file, and size has been declared as an integer: FileInfo fileInfo = new FileInfo(FILE_NAME); size = fileInfo.Length; Your program's output should look like the following: The size of the Word file is FILE_SIZE and the size of the Notepad file is FILE_SIZE The Notepad file is x% of the size of the Word file I am getting the error Test Case IncompleteFileComparison calculates the difference between the .txt and .docxfiles…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 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
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