Programming with Microsoft Visual Basic 2017
8th Edition
ISBN: 9781337102124
Author: Diane Zak
Publisher: Cengage Learning
expand_more
expand_more
format_list_bulleted
Expert Solution & Answer
Chapter 11, Problem 6RQ
Program Description Answer
The ex.Message statement is used to access the description of an exception.
Hence, the correct answer is option “C”.
Expert Solution & Answer
Want to see the full answer?
Check out a sample textbook solutionStudents have asked these similar questions
If an application contains the Catch ex As Exception clause, which of the following can be used to access the exception’s description? a. ex.Description b. ex.Exception c. ex.Message d. Exception.Description
If a procedure contains the Catch ex As Exception clause, you can use ____________to access the exception’s description.a. ex.Descriptionb. ex.Exception
c. ex.Messaged. none of the above
In every program data must be validated before the program can proceed with further processing and storage of the input data. As a Windows developer for a data analysis company, you are tasked to develop an application using Windows form / Windows Presentation Foundation (WPF) named mileage efficiency. Your interface should look as shown below.You should include the following in your program1. Exception handling should be used to prevent users from entering invalid input (text, character...) (try, catch and final)2. All exception messages should be display using a message box and save in a text file called Exceptionfile.txt3. All result (miles divided by gallon) should be save in a file called MilesperGallon.txt. The result should be saved once the calculate button is pressed 4. Meaning your program will have two separate text files one to record all exception thrown – message and the other to record all calculation and the date and time the operation occurred
Run the project. Enter…
Chapter 11 Solutions
Programming with Microsoft Visual Basic 2017
Knowledge Booster
Similar questions
- In every program data must be validated before the program can proceed with further processing and storage of the input data. As a Windows developer for a data analysis company, you are tasked to develop an application using Windows form / Windows Presentation Foundation (WPF) named mileage efficiency. Your interface should look as shown below. The program should have exception handling in as well. You should include the following in your program 1. Exception handling should be used to prevent users from entering invalid input (text, character...) (try, catch and final) 2. All exception messages should be display using a message box and save in a text file called Exceptionfile.txt 3. All result (miles divided by gallon) should be save in a file called MilesperGallon.txt. The result should be saved once the calculate button is pressed 4. Meaning your program will have two separate text files one to record all exception thrown – message and the other to record all calculation…arrow_forwardYou have started an application by clicking the start Debugging button or by pressing F5 on the keyboard. If an exception is thrown, the application stops run- ning and Visual Studio goes into a special mode known as __________.a. exception modeb. break modec. debug moded. crash modearrow_forwardCreate a folder named LastName_FirstName (ex. Reyes_Mark) in your local Create a new project named LabExer5B. Set the project location to your own The program shall: contain an array of 10 multiple choice questions with three (3) choices each and require the user to choose among A, B, or C; Note: Cases are ignored. Lowercase letters are acceptable (a, b, c). Create a try-catch structure to handle three (3) exceptions. These are when the user inputs the following: an invalid letter (not A, B, or C) a number or any special character blank (no answer) Prompt the user that he can answer again if any of the three (3) exceptions is Display the score.arrow_forward
- Please use the 4 functions in the starter code, thank you! 1. Format your code as provided in the Lab 2 Start Code provided below. 2. The user prompt for a size will be: "Please input your staircase size:" 3. Perform a function call within the exception handling logic (Your function that contains the code to run the program should be within a try/except block - see comments in the starter code). 4. Raise and Handle the following exceptions: - A custom exception called "IntegerOutOfRangeException" when the user provides an integer value that is not within the valid integer range. ("That staircase size is out of range.") - A custom exception called "NoStairCaseException" when the user provides a staircase size of 0. ("There are no steps in the staircase.") - In ValueError for user input that are not integers. ("There are no steps in the staircase.") 5. The error messages for the above exceptions should be the same as above and printed to the shell. 6. The program…arrow_forwardCreate an application that will evaluate whether a student is eligible for the final examination using exceptionsarrow_forwardYou have started an application by clicking the start Debugging button ( ) or by pressing on the keyboard. If an exception is thrown, the application stops running and Visual Studio goes into a special mode known as __________. a. exception mode b. break mode c. debug mode d. crash modearrow_forward
- This code runs only if there is an exception. except try finally els When checking values entered by the user, the code performs ________________ Exception validation Input validation Number conversion User validatio The program should use exception checking __________ Only when working with files Only when working with numbers Only when working with user input Whenever there is the possibility of an outside error When an exception has been generated, it is said to have been ___________ caught killed built raised You write this statement to respond to exceptions Question 5 options: run/handle try/handle attempt/except…arrow_forwardCreate a folder named LastName_FirstName(please write Dahanyoon (ex. Reyes_Mark) in your local Create a new project named LabExer5A. Set the project location to your own The program shall: generate a random number from 1 to 50 for a player to guess; display a message that indicates whether the player’s guess is correct, too low, or too high; and prompt the user to keep on guessing until the correct value is entered Create a try-catch structure that will handle two (2) exceptions. These are when the user inputs the following: a number that is out of range (1 – 50) a letter or any non-numeric character Prompt the user so that he can guess again if an exception is Display the number of total Note: An invalid input (when an exception is thrown) is not considered a valid guess or attempt.arrow_forward
arrow_back_ios
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
- C++ Programming: From Problem Analysis to Program...Computer ScienceISBN:9781337102087Author:D. S. MalikPublisher:Cengage Learning
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++ Programming: From Problem Analysis to Program...
Computer Science
ISBN:9781337102087
Author:D. S. Malik
Publisher:Cengage Learning