Deck 5: More on the Selection Structure
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Unlock Deck
Sign up to unlock the cards in this deck!
Unlock Deck
Unlock Deck
1/60
Play
Full screen (f)
Deck 5: More on the Selection Structure
1
A common error made when writing selection structures is to use a compound condition in the outer selection structure when a nested selection structure is needed.
True
2
Programmers desk-check an algorithm to verify that it is not missing any steps, and that the existing steps are correct and in the proper order.
True
3
The minimum number of radio buttons in a group is one.
False
4
The set of step-by-step instructions for accomplishing a task is called a(n) ____.
A) flow
B) desk-checking
C) alpha checking
D) algorithm
A) flow
B) desk-checking
C) alpha checking
D) algorithm
Unlock Deck
Unlock for access to all 60 flashcards in this deck.
Unlock Deck
k this deck
5
In a Case selection structure, the expression Case Is 10 To 5 would be an incorrectly formed case statement.
Unlock Deck
Unlock for access to all 60 flashcards in this deck.
Unlock Deck
k this deck
6
In a nested selection structure, the ____ decision is always made by the inner selection structure.
A) primary
B) secondary
C) binary
D) linear
A) primary
B) secondary
C) binary
D) linear
Unlock Deck
Unlock for access to all 60 flashcards in this deck.
Unlock Deck
k this deck
7
In a nested selection structure, the primary decision is always made by the outer selection structure.
Unlock Deck
Unlock for access to all 60 flashcards in this deck.
Unlock Deck
k this deck
8
An unnecessary selection structure within a nested selection structure will make the program inefficient.
Unlock Deck
Unlock for access to all 60 flashcards in this deck.
Unlock Deck
k this deck
9
When a user selects a second CheckBox in a group, previously selected CheckBox items are deselected.
Unlock Deck
Unlock for access to all 60 flashcards in this deck.
Unlock Deck
k this deck
10
The Select Case statement ends with the ____ clause.
A) End
B) End Case
C) End Select
D) Select End
A) End
B) End Case
C) End Select
D) Select End
Unlock Deck
Unlock for access to all 60 flashcards in this deck.
Unlock Deck
k this deck
11
The condition in a multiple-path selection structure is represented by a ____ in a flowchart.
A) diamond
B) square
C) circle
D) rectangle
A) diamond
B) square
C) circle
D) rectangle
Unlock Deck
Unlock for access to all 60 flashcards in this deck.
Unlock Deck
k this deck
12
A selection structure that can choose from several alternatives is called a(n) ____ selection structure.
A) dynamic
B) complex
C) secondary
D) extended
A) dynamic
B) complex
C) secondary
D) extended
Unlock Deck
Unlock for access to all 60 flashcards in this deck.
Unlock Deck
k this deck
13
When the Select Case statement includes a Case ____ clause, this clause must be the last clause in the statement.
A) Otherwise
B) Else
C) Next
D) Last
A) Otherwise
B) Else
C) Next
D) Last
Unlock Deck
Unlock for access to all 60 flashcards in this deck.
Unlock Deck
k this deck
14
In a Case selection structure, each expression in an expression list is separated by a ____.
A) semicolon (;)
B) colon (:)
C) period (.)
D) comma (,)
A) semicolon (;)
B) colon (:)
C) period (.)
D) comma (,)
Unlock Deck
Unlock for access to all 60 flashcards in this deck.
Unlock Deck
k this deck
15
A meat packer grades meat "P" for Prime, "C" for Choice, "S" for Standard, and "G" for Good. Which of the following Case expressions is incorrect?
A) Case "P", "C"
B) Case "S"
C) Case "CGSP"
D) Case Else
A) Case "P", "C"
B) Case "S"
C) Case "CGSP"
D) Case Else
Unlock Deck
Unlock for access to all 60 flashcards in this deck.
Unlock Deck
k this deck
16
The default radio button is designated by setting the Checked property to a value of True.
Unlock Deck
Unlock for access to all 60 flashcards in this deck.
Unlock Deck
k this deck
17
Reversing the primary and secondary logical decisions when writing a selection structure that contains a nested selection structure has no impact on the program's execution.
Unlock Deck
Unlock for access to all 60 flashcards in this deck.
Unlock Deck
k this deck
18
Desk-checking is also called ____.
A) prototyping
B) hand-tracing
C) alpha checking
D) beta checking
A) prototyping
B) hand-tracing
C) alpha checking
D) beta checking
Unlock Deck
Unlock for access to all 60 flashcards in this deck.
Unlock Deck
k this deck
19
In a nested selection structure, the ____ decision is always made by the outer selection structure.
A) primary
B) secondary
C) binary
D) linear
A) primary
B) secondary
C) binary
D) linear
Unlock Deck
Unlock for access to all 60 flashcards in this deck.
Unlock Deck
k this deck
20
The If/ElseIf/Else selection structure needs only one End If statement to mark the end of the selection structure.
Unlock Deck
Unlock for access to all 60 flashcards in this deck.
Unlock Deck
k this deck
21
In a Case selection structure, you use the ____ keyword when you know both the upper and lower bounds of the range.
A) From
B) Is
C) To
D) Range
A) From
B) Is
C) To
D) Range
Unlock Deck
Unlock for access to all 60 flashcards in this deck.
Unlock Deck
k this deck
22
An online bookseller uses the following schedule to determine the shipping costs:
What is a correct case expression for a category II book order based upon Books Ordered?
A) Case Is
B) Case 4 To 7
C) Case Is 4 To 7
D) Case Between 4 and 7

A) Case Is
B) Case 4 To 7
C) Case Is 4 To 7
D) Case Between 4 and 7
Unlock Deck
Unlock for access to all 60 flashcards in this deck.
Unlock Deck
k this deck
23
Case-Based Critical Thinking Questions Case 1 - Horizon Cleaners
Horizon Cleaners is an organic dry cleaner for clothing. The price for dry cleaning a shirt is $3.00, the price for pants is $3.50, and the price for dresses is $4.00. All clothes can be either washed or dry cleaned. Dry cleaned clothes can be hung or folded, and folded items cost an additional $0.50 per item.
The application needs to assign the fee for folded clothes. The primary decision for the scenario is to first determine ____.
A) whether the customer is having a shirt, or pants, or a dress cleaned
B) when the customer will pick up the clothes
C) if the customer wants clothes hung or folded
D) if the customer wants clothes washed or dry cleaned
Horizon Cleaners is an organic dry cleaner for clothing. The price for dry cleaning a shirt is $3.00, the price for pants is $3.50, and the price for dresses is $4.00. All clothes can be either washed or dry cleaned. Dry cleaned clothes can be hung or folded, and folded items cost an additional $0.50 per item.
The application needs to assign the fee for folded clothes. The primary decision for the scenario is to first determine ____.
A) whether the customer is having a shirt, or pants, or a dress cleaned
B) when the customer will pick up the clothes
C) if the customer wants clothes hung or folded
D) if the customer wants clothes washed or dry cleaned
Unlock Deck
Unlock for access to all 60 flashcards in this deck.
Unlock Deck
k this deck
24
After creating a Random object, you can generate random integers using the ____ method.
A) Random.Call
B) Random.Number
C) Random.Generate
D) Random.Next
A) Random.Call
B) Random.Number
C) Random.Generate
D) Random.Next
Unlock Deck
Unlock for access to all 60 flashcards in this deck.
Unlock Deck
k this deck
25
When the programmer wants to limit the user to one choice during input of mutually exclusive options, the ____ control should be used.
A) TextBox
B) CheckBox
C) RadioButton
D) Label
A) TextBox
B) CheckBox
C) RadioButton
D) Label
Unlock Deck
Unlock for access to all 60 flashcards in this deck.
Unlock Deck
k this deck
26
You create the Random object by declaring it in a ____ statement.
A) Get
B) Dim
C) Sub
D) Private
A) Get
B) Dim
C) Sub
D) Private
Unlock Deck
Unlock for access to all 60 flashcards in this deck.
Unlock Deck
k this deck
27
A selection structure's true path should calculate the ending inventory value only when the price entered by the user can be converted to a number. Which statement will return a Boolean value of True and store it in blnPriceOK if the number can be converted?
A) dblPrice.Text = Double.TryParse(txtPrice.Text, dblPrice)
B) blnPriceOK = Double.TryParse(txtPrice.Text, dblPrice)
C) blnPriceOK = Double.TryParse(dblPrice, txtPrice.Text)
D) dblPrice.Text = Double.TryParse(blnPriceOK.Text)
A) dblPrice.Text = Double.TryParse(txtPrice.Text, dblPrice)
B) blnPriceOK = Double.TryParse(txtPrice.Text, dblPrice)
C) blnPriceOK = Double.TryParse(dblPrice, txtPrice.Text)
D) dblPrice.Text = Double.TryParse(blnPriceOK.Text)
Unlock Deck
Unlock for access to all 60 flashcards in this deck.
Unlock Deck
k this deck
28
Which of the following would be an appropriate use of a check box control?
A) Marital Status (Married, Single)
B) Gender (Female, Male)
C) Full Time - Part Time
D) Insurance Benefits (Health, Dental, Vision)
A) Marital Status (Married, Single)
B) Gender (Female, Male)
C) Full Time - Part Time
D) Insurance Benefits (Health, Dental, Vision)
Unlock Deck
Unlock for access to all 60 flashcards in this deck.
Unlock Deck
k this deck
29

A) 0
B) 312.50
C) 350
D) 375
Unlock Deck
Unlock for access to all 60 flashcards in this deck.
Unlock Deck
k this deck
30
When the programmer wants to allow the user to select any number of choices from a group of one or more independent and nonexclusive choices, the ____ control should be used.
A) TextBox
B) CheckBox
C) RadioButton
D) Label
A) TextBox
B) CheckBox
C) RadioButton
D) Label
Unlock Deck
Unlock for access to all 60 flashcards in this deck.
Unlock Deck
k this deck
31
If the txtBalance control contains the value $52, what value will the Decimal.TryParse(txtBalance.Text, decBalance) method return?
A) True
B) False
C) 52
D) 0
A) True
B) False
C) 52
D) 0
Unlock Deck
Unlock for access to all 60 flashcards in this deck.
Unlock Deck
k this deck
32
When a check box is selected, its Checked property contains the ____.
A) Boolean value True
B) Boolean value False
C) numeric value 0
D) numeric value 1
A) Boolean value True
B) Boolean value False
C) numeric value 0
D) numeric value 1
Unlock Deck
Unlock for access to all 60 flashcards in this deck.
Unlock Deck
k this deck
33
In a Case selection structure, you use the ____ keyword when you know only one end of the range.
A) From
B) Is
C) To
D) Range
A) From
B) Is
C) To
D) Range
Unlock Deck
Unlock for access to all 60 flashcards in this deck.
Unlock Deck
k this deck
34
Case-Based Critical Thinking Questions Case 1 - Horizon Cleaners
Horizon Cleaners is an organic dry cleaner for clothing. The price for dry cleaning a shirt is $3.00, the price for pants is $3.50, and the price for dresses is $4.00. All clothes can be either washed or dry cleaned. Dry cleaned clothes can be hung or folded, and folded items cost an additional $0.50 per item.
The secondary decision for assigning the fee for folded clothes is to determine ____.
A) whether the customer is having a shirt, or pants, or a dress cleaned
B) when the customer will pick up the clothes
C) if the customer wants clothes hung or folded
D) if the customer wants clothes washed or dry cleaned
Horizon Cleaners is an organic dry cleaner for clothing. The price for dry cleaning a shirt is $3.00, the price for pants is $3.50, and the price for dresses is $4.00. All clothes can be either washed or dry cleaned. Dry cleaned clothes can be hung or folded, and folded items cost an additional $0.50 per item.
The secondary decision for assigning the fee for folded clothes is to determine ____.
A) whether the customer is having a shirt, or pants, or a dress cleaned
B) when the customer will pick up the clothes
C) if the customer wants clothes hung or folded
D) if the customer wants clothes washed or dry cleaned
Unlock Deck
Unlock for access to all 60 flashcards in this deck.
Unlock Deck
k this deck
35
Which of the following conditions will evaluate to True when the chkValidID check box is not selected?
A) If chkValidID.check = False Then
B) If chkValidID.check = No Then
C) If chkValidID.checked = No Then
D) If chkValidID.checked = False Then
A) If chkValidID.check = False Then
B) If chkValidID.check = No Then
C) If chkValidID.checked = No Then
D) If chkValidID.checked = False Then
Unlock Deck
Unlock for access to all 60 flashcards in this deck.
Unlock Deck
k this deck
36
The ____ event occurs each time you select or deselect a check box or radio button.
A) Checked
B) Changed
C) CheckedChanged
D) ChangedChecked
A) Checked
B) Changed
C) CheckedChanged
D) ChangedChecked
Unlock Deck
Unlock for access to all 60 flashcards in this deck.
Unlock Deck
k this deck
37

A) 0
B) 125
C) 140
D) 150
Unlock Deck
Unlock for access to all 60 flashcards in this deck.
Unlock Deck
k this deck
38
You enter the label for a radio button using sentence capitalization in the radio button's ____ property.
A) Text
B) Label
C) Face
D) Heading
A) Text
B) Label
C) Face
D) Heading
Unlock Deck
Unlock for access to all 60 flashcards in this deck.
Unlock Deck
k this deck
39

A) 187.50
B) 250
C) 280
D) 300
Unlock Deck
Unlock for access to all 60 flashcards in this deck.
Unlock Deck
k this deck
40
The maximum number of radio buttons that can be selected from a group is ____.
A) one
B) three
C) five
D) seven
A) one
B) three
C) five
D) seven
Unlock Deck
Unlock for access to all 60 flashcards in this deck.
Unlock Deck
k this deck
41
Case-Based Critical Thinking Questions Case 1 - Horizon Cleaners
Horizon Cleaners is an organic dry cleaner for clothing. The price for dry cleaning a shirt is $3.00, the price for pants is $3.50, and the price for dresses is $4.00. All clothes can be either washed or dry cleaned. Dry cleaned clothes can be hung or folded, and folded items cost an additional $0.50 per item.
You meet with the manager to show her the interface and obtain feedback. She tells you that very few customers request dry cleaned clothes to be folded. She suggests only applying the folding fee if a customer makes a special request, and it should be calculated for all laundered items in a customer's order. You decide to make the folding fee ____.
A) a single radio button and remove it from the nested selection structure
B) a single check box and remove it from the nested selection structure
Horizon Cleaners is an organic dry cleaner for clothing. The price for dry cleaning a shirt is $3.00, the price for pants is $3.50, and the price for dresses is $4.00. All clothes can be either washed or dry cleaned. Dry cleaned clothes can be hung or folded, and folded items cost an additional $0.50 per item.
You meet with the manager to show her the interface and obtain feedback. She tells you that very few customers request dry cleaned clothes to be folded. She suggests only applying the folding fee if a customer makes a special request, and it should be calculated for all laundered items in a customer's order. You decide to make the folding fee ____.
A) a single radio button and remove it from the nested selection structure
B) a single check box and remove it from the nested selection structure
Unlock Deck
Unlock for access to all 60 flashcards in this deck.
Unlock Deck
k this deck
42
Write a multiple-alternative selection structure that assigns an interest rate (.04, .05, .06) to the decInterestRate variable. The appropriate rate depends on the radio button selected by the user in the interface. The names of the radio buttons are rad4Rate, rad5Rate, and rad6Rate. Use the Select Case statement.
Unlock Deck
Unlock for access to all 60 flashcards in this deck.
Unlock Deck
k this deck
43
The price chart for Trent Wholesale is shown below. Rewrite the incorrect statements in the associated code to correct all errors.
Quantity Ordered Price per Item
1-10 $12
11-20 $11
More than 20 $9
Less than 1 $0
Case Select intQuantity
Case
intPrice = 12
Case Is 11 - 20
intPrice = 11
Case > 20
intPrice = 9
Case Else
intPrice = 0
End Select
Quantity Ordered Price per Item
1-10 $12
11-20 $11
More than 20 $9
Less than 1 $0
Case Select intQuantity
Case
intPrice = 12
Case Is 11 - 20
intPrice = 11
Case > 20
intPrice = 9
Case Else
intPrice = 0
End Select
Unlock Deck
Unlock for access to all 60 flashcards in this deck.
Unlock Deck
k this deck
44
Write a multiple-alternative selection structure that displays the name of an instructor based on the class section entered by the user. The class section is stored (as uppercase) in the strSection variable. Display "Edwards" when the class section is A. Display "Hughes" when the class section is B. Display "Meadows" when the class section is C. For all other sections, display "To Be Announced". Display the message in the lblMessage control. Use the If/ElseIf/Else form of the If...Then...Else statement.
Unlock Deck
Unlock for access to all 60 flashcards in this deck.
Unlock Deck
k this deck
45
BounceIt Gymnasium needs an application to calculate the fee for hosting a party. The fee is based on the number of guests. The fee structure is provided below.
Guests Fee per Guest
1 - 10 $5
11 - 20 $4
More than 20 $2
Write a multiple-alternative selection structure that assigns the appropriate fee to intFee based on the number of guests stored in the intNumGuests variable. Use the Select Case statement.
Guests Fee per Guest
1 - 10 $5
11 - 20 $4
More than 20 $2
Write a multiple-alternative selection structure that assigns the appropriate fee to intFee based on the number of guests stored in the intNumGuests variable. Use the Select Case statement.
Unlock Deck
Unlock for access to all 60 flashcards in this deck.
Unlock Deck
k this deck
46
Ocean Resorts, Inc. pays a commission to employees based on an employee's sales and the number of years the employee has been with the company. Employee sales is stored in the decSales variable, and the number of years employed is stored in the intYears variable. The application should calculate the commission for an employee. The commission is 6% for sales of at least $100,000. If an employee's sales total is less than $100,000, the employee will receive a 3% commission if he or she has been with the company for two years or more. Otherwise, the employee does not receive a commission. Assign the commission to the decCommission variable. Write an If...Then...Else statement for the nested selection structure.
Unlock Deck
Unlock for access to all 60 flashcards in this deck.
Unlock Deck
k this deck
47
Problems - Correcting Logic and Code Errors
BrightStar Day School needs an application to calculate the total monthly tuition charge for students. The tuition schedule is shown below:
Class Fee per Month
Tuesday (T) and Thursday (R) $135
Monday (M), Wednesday (W), and Friday (F) $120
Students in the Tuesday and Thursday class can attend on Friday for an extra fee of $10 for each Friday attended. Rewrite the following algorithm to correct any logic errors:
If TR class and attend on Friday
Tuition = 135 + 10
Else
If MWF
Tuition = 120
End If
End If
BrightStar Day School needs an application to calculate the total monthly tuition charge for students. The tuition schedule is shown below:
Class Fee per Month
Tuesday (T) and Thursday (R) $135
Monday (M), Wednesday (W), and Friday (F) $120
Students in the Tuesday and Thursday class can attend on Friday for an extra fee of $10 for each Friday attended. Rewrite the following algorithm to correct any logic errors:
If TR class and attend on Friday
Tuition = 135 + 10
Else
If MWF
Tuition = 120
End If
End If
Unlock Deck
Unlock for access to all 60 flashcards in this deck.
Unlock Deck
k this deck
48
Jamestown Medical Center pays a year-end bonus (either $100 or $200) to all employees based on their participation in a wellness program. To receive the $100 bonus, employees must pass the annual health screening. To receive the $200 bonus, employees must pass the annual health screening and participate in the Healthy Life Workshop. If an employee does not pass the health screening, he or she does not receive a bonus. The application should display the bonus amount at the end. Write the algorithm for this application.
Unlock Deck
Unlock for access to all 60 flashcards in this deck.
Unlock Deck
k this deck
49
An application needs to generate three random numbers that can be from 1 to 9. The random numbers will be assigned to variables named intNum1 , intNum2 , and intNum3 . Write the necessary statements to generate the random numbers and store them in their respective variables. The following Dim statements are provided:
Dim intNum1 As Integer
Dim intNum2 As Integer
Dim intNum3 As Integer
Dim intNum1 As Integer
Dim intNum2 As Integer
Dim intNum3 As Integer
Unlock Deck
Unlock for access to all 60 flashcards in this deck.
Unlock Deck
k this deck
50
What is a nested selection structure? How do primary and secondary decisions relate to a nested selection structure?
Unlock Deck
Unlock for access to all 60 flashcards in this deck.
Unlock Deck
k this deck
51
Case-Based Critical Thinking Questions Case 1 - Horizon Cleaners
Horizon Cleaners is an organic dry cleaner for clothing. The price for dry cleaning a shirt is $3.00, the price for pants is $3.50, and the price for dresses is $4.00. All clothes can be either washed or dry cleaned. Dry cleaned clothes can be hung or folded, and folded items cost an additional $0.50 per item.
The interface provides a text box for the user to enter the number of shirts being laundered. You want to make sure a string typed in by the user can be converted to a number to be used in the calculation for the total. Which of the following statements is valid?
A) strIsOK = TryParse(txtShirts.Text, intShirts)
B) strIsOK = Integer.TryParse(intShirts, txtShirts.Text)
C) blnIsOK = Integer.TryParse(txtShirts.Text, intShirts)
D) blnIsOK = TryParse(txtShirts.Text, intShirts)
Horizon Cleaners is an organic dry cleaner for clothing. The price for dry cleaning a shirt is $3.00, the price for pants is $3.50, and the price for dresses is $4.00. All clothes can be either washed or dry cleaned. Dry cleaned clothes can be hung or folded, and folded items cost an additional $0.50 per item.
The interface provides a text box for the user to enter the number of shirts being laundered. You want to make sure a string typed in by the user can be converted to a number to be used in the calculation for the total. Which of the following statements is valid?
A) strIsOK = TryParse(txtShirts.Text, intShirts)
B) strIsOK = Integer.TryParse(intShirts, txtShirts.Text)
C) blnIsOK = Integer.TryParse(txtShirts.Text, intShirts)
D) blnIsOK = TryParse(txtShirts.Text, intShirts)
Unlock Deck
Unlock for access to all 60 flashcards in this deck.
Unlock Deck
k this deck
52
Logic errors in selection structures are a result of one of four common mistakes. List the four common logic errors made when writing selection structures.
Unlock Deck
Unlock for access to all 60 flashcards in this deck.
Unlock Deck
k this deck
53
Write a multiple-alternative selection structure that displays the name of an instructor based on the class section entered by the user. The class section is stored (as uppercase) in the strSection variable. Display "Edwards" when the class section is A. Display "Hughes" when the class section is B. Display "Meadows" when the class section is C. For all other sections, display "To Be Announced". Display the message in the lblMessage control. Use the Select Case statement.
Unlock Deck
Unlock for access to all 60 flashcards in this deck.
Unlock Deck
k this deck
54
An application needs to generate a random number that is greater than or equal to 1 but less than 348. Write the statements to generate the random number and assign it to the intNum variable.
Unlock Deck
Unlock for access to all 60 flashcards in this deck.
Unlock Deck
k this deck
55
Colin is renting an automobile to take on vacation to the mountains. He would like to rent an SUV or a truck, but he would prefer an SUV for the covered storage. However, he does not know if there are any SUVs or trucks at the rental location where he lives. If there is not an SUV or a truck to rent, he will have to rent a car. He is going to call a rental agent and inquire about the available automobiles. Write an algorithm for this scenario.
Unlock Deck
Unlock for access to all 60 flashcards in this deck.
Unlock Deck
k this deck
56
Case-Based Critical Thinking Questions Case 1 - Horizon Cleaners
Horizon Cleaners is an organic dry cleaner for clothing. The price for dry cleaning a shirt is $3.00, the price for pants is $3.50, and the price for dresses is $4.00. All clothes can be either washed or dry cleaned. Dry cleaned clothes can be hung or folded, and folded items cost an additional $0.50 per item.
A group of ____ should be used on the interface for the user to select the customer's preference for washing or dry cleaning the clothes.
A) radio buttons
B) check boxes
C) text boxes
D) labels
Horizon Cleaners is an organic dry cleaner for clothing. The price for dry cleaning a shirt is $3.00, the price for pants is $3.50, and the price for dresses is $4.00. All clothes can be either washed or dry cleaned. Dry cleaned clothes can be hung or folded, and folded items cost an additional $0.50 per item.
A group of ____ should be used on the interface for the user to select the customer's preference for washing or dry cleaning the clothes.
A) radio buttons
B) check boxes
C) text boxes
D) labels
Unlock Deck
Unlock for access to all 60 flashcards in this deck.
Unlock Deck
k this deck
57
Write the TryParse statement that will convert the string stored in the txtBalance control to a Decimal number. The Decimal number should be stored in the decBalance variable, and the Boolean value that is returned should be stored in the blnIsNumber variable.
Unlock Deck
Unlock for access to all 60 flashcards in this deck.
Unlock Deck
k this deck
58
Write a multiple-alternative selection structure that determines the shipping charge based on the total order amount entered by the user. The shipping charge is stored in the intShipCharge variable. The total order amount is stored in the decTotalOrder variable. The shipping charge is $9 for all orders under $25. The shipping charge is $8 for all orders of $25 to $50. The shipping charge is $7 for all orders where the total order amount is greater than $50. If the user does not enter a valid total order amount (less than 0), display "Please enter a valid amount." in the lblMessage control. Use the Select Case statement.
Unlock Deck
Unlock for access to all 60 flashcards in this deck.
Unlock Deck
k this deck
59
Write an If...Then...Else statement that assigns a discount of $5 when a customer provides a coupon during checkout. If the customer does not provide a coupon, then there is no discount. The clerk must select the Coupon Provided check box for the customer to receive the discount. Create your own variable names.
Unlock Deck
Unlock for access to all 60 flashcards in this deck.
Unlock Deck
k this deck
60
Define the term "algorithm." How is desk-checking used to verify algorithms?
Unlock Deck
Unlock for access to all 60 flashcards in this deck.
Unlock Deck
k this deck