EBK STARTING OUT WITH VISUAL BASIC
7th Edition
ISBN: 8220102744202
Author: Irvine
Publisher: PEARSON
expand_more
expand_more
format_list_bulleted
Concept explainers
Textbook Question
Chapter 4.8, Problem 4.11CP
Convert the following
If … Then … Elself statement into a Select Case statement.
If intQuantity >= 0 And intQuantity
<= 9 Then
decDiscount = 0.1
Elself intQuantity >= 10 And
intQuantity <= 19 Then
decDiscount = 0.2
Elself intQuantity >= 20 And
intQuantity <=29 Then
decDiscount = 0.3
Elself intQuantity >= 30 Then
decDiscount = 0.4
Else
MessageBox.Show("Invalid Data")
End If
Expert Solution & Answer
Want to see the full answer?
Check out a sample textbook solutionStudents have asked these similar questions
Language: Visual basic
The Select Case statement shown in Figure 5-86 contains one or more errors. Identify the error(s) and rewrite the statements correctly.
Select Case intNumberOfSeats
Case > 5000
strVenueType = "Stadium"
Case > 2000
strVenueTYpe
"Amphitheater"
Case > 1000
strVenueType = "Auditorium"
Case > 200
strVenueTYpe
"Theater"
Case > 0
strVenueType = "Club"
Else Case
strVenueType
"Error"
Select End
True or False?
Every if statement must have a corresponding else.
Chapter 4 Solutions
EBK STARTING OUT WITH VISUAL BASIC
Ch. 4.2 - Prob. 4.1CPCh. 4.2 - In the following If Then statement, assume that...Ch. 4.2 - Do both of the following If Then statements...Ch. 4.2 - Prob. 4.4CPCh. 4.3 - Prob. 4.5CPCh. 4.4 - The following If Then ElseIf statement has...Ch. 4.4 - Prob. 4.7CPCh. 4.6 - Prob. 4.8CPCh. 4.7 - Prob. 4.9CPCh. 4.7 - Prob. 4.10CP
Ch. 4.8 - Convert the following If Then Elself statement...Ch. 4.10 - Prob. 4.12CPCh. 4.10 - Prob. 4.13CPCh. 4.10 - Write a Boolean expression that equals true when a...Ch. 4.10 - Prob. 4.15CPCh. 4.10 - Prob. 4.16CPCh. 4 - A (n) _______structure allows a program to execute...Ch. 4 - A (n) _______operator determines if a specific...Ch. 4 - Boolean expressions can only be evaluated as_____...Ch. 4 - A (n)_______is a Boolean variable that signals...Ch. 4 - Prob. 5FIBCh. 4 - Prob. 6FIBCh. 4 - A(n)________ If statement is an If statement that...Ch. 4 - _______operators connect two or more relational...Ch. 4 - Prob. 9FIBCh. 4 - Prob. 10FIBCh. 4 - Prob. 11FIBCh. 4 - Prob. 12FIBCh. 4 - Prob. 13FIBCh. 4 - Prob. 14FIBCh. 4 - Prob. 15FIBCh. 4 - Prob. 16FIBCh. 4 - Prob. 17FIBCh. 4 - Prob. 18FIBCh. 4 - ________ is the process of inspecting input values...Ch. 4 - Prob. 20FIBCh. 4 - Prob. 21FIBCh. 4 - Prob. 1TFCh. 4 - T F: It is not possible to write Boolean...Ch. 4 - Prob. 3TFCh. 4 - T F: Clicking on a radio button selects it and...Ch. 4 - T F: Radio buttons that are placed inside a group...Ch. 4 - Prob. 6TFCh. 4 - Prob. 7TFCh. 4 - Prob. 8TFCh. 4 - Prob. 9TFCh. 4 - Prob. 10TFCh. 4 - Prob. 1MCCh. 4 - This statement can cause other program statements...Ch. 4 - Prob. 3MCCh. 4 - This statement is like a chain of If statements....Ch. 4 - When placed at the end of an IfThenElself...Ch. 4 - When an If statement is placed inside another If...Ch. 4 - This operator connects two Boolean expressions...Ch. 4 - This operator connects two Boolean expressions...Ch. 4 - Prob. 9MCCh. 4 - This operator connects two Boolean expressions...Ch. 4 - When determining whether a number is inside a...Ch. 4 - When determining whether a number is outside a...Ch. 4 - Prob. 13MCCh. 4 - This method attempts to convert a value to...Ch. 4 - Prob. 15MCCh. 4 - Describe the difference between the If Then ...Ch. 4 - In an IfThenElseIf statement, what is the purpose...Ch. 4 - What is a flag and how does it work?Ch. 4 - Briefly describe how the And operator works.Ch. 4 - Briefly describe how the Or operator works.Ch. 4 - How is the Xor operator different from the Or...Ch. 4 - Prob. 7SACh. 4 - How is the OrElse operator different from the Or...Ch. 4 - Why are the relational operators called...Ch. 4 - Prob. 2WDTCh. 4 - Why does Visual Studio automatically indent them...Ch. 4 - Prob. 4WDTCh. 4 - Prob. 1FTECh. 4 - Prob. 1AWCh. 4 - Write an IfThen statement that assigns 0 to intX...Ch. 4 - Write an IfThen statement that multiplies...Ch. 4 - Prob. 4AWCh. 4 - Write an IfThen statement that sets the variable...Ch. 4 - Write an IfThenElse statement that assigns 1 to...Ch. 4 - The string variable strPeople contains a list of...Ch. 4 - Write an IfThen statement that prints the message...Ch. 4 - Write an IfThen statement that prints the message...Ch. 4 - Prob. 10AWCh. 4 - Prob. 1PCCh. 4 - Roman Numeral Converter The Roman Numeral...Ch. 4 - Fat Percentage Calculator Create an application...Ch. 4 - Weekly Temperatures with Validation Programming...Ch. 4 - Software Sales Software companies often offer...Ch. 4 - Sailboat Race Ranking Programming Challenge 7 in...Ch. 4 - Pay Per Click Advertising Revenue Many Web sites...Ch. 4 - Speed of Sound The following table shows the...Ch. 4 - Prob. 9PCCh. 4 - Name Formatting Create an application that lets...Ch. 4 - Prob. 11PCCh. 4 - Museum Tours Write a program that lets the user...Ch. 4 - Prob. 13PCCh. 4 - Mass and Weight Scientists measure an objects mass...Ch. 4 - Book Club Points Serendipity Booksellers has a...Ch. 4 - Body Mass Index Program Enhancement In Programming...Ch. 4 - Magic Dates The date June 10, 1960, is special...
Additional Engineering Textbook Solutions
Find more solutions based on key concepts
When is the output of an XOR gate HIGH?
Digital Fundamentals (11th Edition)
Predict what you think will happen if you change the test in insertMoney to use the greater-than or equal-to op...
Objects First with Java: A Practical Introduction Using BlueJ (6th Edition)
Answer question 3.33, but do not consider any pet having the breed of Unknown.
Database Concepts (8th Edition)
In Exercises 53 through 56, determine the output produced by the lines of code where Courier New is the font se...
Introduction To Programming Using Visual Basic (11th Edition)
What is a keyword? List some Java keywords.
Introduction to Java Programming and Data Structures, Comprehensive Version (11th Edition)
Fix the bug in the code in the earlier subsection "Tracing Variables."
Absolute Java (6th 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
- Serendipity Booksellers has a book club that awards points to its customers based on the number of books purchased each month. The points are awarded as follows: If a customer purchases no books, he or she earns 0 points If a customer purchases 1 through 5 books, he or she earns 5 points for each book. If a customer purchases 6 through 10 books, he or she earns 10 points for each book. If a customer purchases 11 or more books, he or she earns points equal to 20 points for each book. (Use Python) Use the Design Recipe to write the function customer_rewards which consumes the number of books purchased, and returns the total points. Include a docstring! Write 3 assert_equal statements to test your function.arrow_forwardThe INVERSE of the statement: If a >2 , then a2>4.arrow_forwardQUESTION 5 You need to use a nested If statement when O You have 2 or more conditions. The second (or third) condition is an 'if.else' statement You have 2 conditions. The second condition is only evaluated if the first condition is True You have 3 conditions. The second condition is only evaluated if the first condition is false You have 3 conditions. The second condition is only evaluated if the first condition is Truearrow_forward
- Write an if/elif statement that assigns a value to the variable bonus depending on the amount of sales, which will be input. Sales Bonus Greater than or equal to 100,000 10,000 Greater than or equal to 75,000 5,000 Greater than or equal to 50,000 2,500 Greater than or equal to 25,000 1,000 Input Format a whole number Constraints input will be positive Output Format One of the bonus amounts listed in the problem statement. Sample Input 0 200000 Sample Output 0 Your bonus is $10,000.00arrow_forwardProvided below is an if statement. Which of the following select case statements can be used to replace the if statement? if grade = “A” then price = price * 2 else if grade = “B” then price = price * 1.14 else if grade = “C” then price = price * 0.9125 else if price > 50 then price = price + 5 else price = price – 4 endif endif endif endif Select one: a.select case grade case “A” price = price * 2 case “B” price = price * 1.14 case “C” price = price * 0.9125 case else if price > 50 then price = price + 5 else price = price – 4 endif endselect b. select case case “A” price = price * 2 case “B” price = price * 1.14 case “C” price = price * 0.9125 case else if price…arrow_forwardWrite an if-else statement that works like this: If the sales variable is greaterthan or equal-to 50,000, the commissionRate variable should be assigned the value 0.2. Otherwise, the commissionRate variable should be assigned the value 0.1.arrow_forward
- Write an if/else statement that compares the value of two variables, lastYrTaxes and estimatedTaxes, and modifies the value of a boolean variable oweMoney appropriately as follows. oweMoney should be true when lastYrTaxes is lower than estimated Taxes and false when that is not the case.arrow_forwardT/F 6. An else clause may or may not be part of an if statement, but it must be part of an if statement.arrow_forwardComputer Science The user should enter his/her latest math course. If that course meets the computer science BAS requirements, congratulate the user. If the highest math course taken is not enough, recommend the next math course to take. - If the user input either of these math course (MATH &146MATH &148MATH &151MATH &152MATH &163 ) congratulate the user - if the user input either of this math course (MATH 081MATH 084MATH 085MATH 097MATH 098MATH 099MATH &107MATH 116MATH &141MATH &142) recommend the next math course to take in order. Html/Javascriptarrow_forward
- The strict equal operator is Select one: a. != b.== C.=== d.=arrow_forward4. Write an if statement that increases pay by 3% if score is greater than 90, otherwise increases pay by 1%.arrow_forwardQuèstion 4 In the swich-case statement, if no case label matches, then the computer will execute the default First case break Last casearrow_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: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:9781337671385
Author:FARRELL
Publisher:CENGAGE LEARNING - CONSIGNMENT
Control Structure in Data Structure - Data Structures - Computer Science Class 12; Author: Ekeeda;https://www.youtube.com/watch?v=9FTw2pXLhv4;License: Standard YouTube License, CC-BY