Deck 5: More on the Selection Structure

Full screen (f)
exit full mode
Question
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
Use Space or
up arrow
down arrow
to flip the card.
Question
In a Case selection structure,each expression in an expression list is separated by a ____.

A) semicolon (;)
B) colon (:)
C) period (. )
D) comma (,)
Question
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.
Question
In a nested selection structure,the primary decision is always made by the outer selection structure.
Question
When a user selects a second CheckBox in a group,previously selected CheckBox items are deselected.
Question
The minimum number of radio buttons in a group is one.
Question
You can hide a control on a form while an application is running by changing the Visible property from False to True.
Question
Desk-checking is also called ____.

A) prototyping
B) hand-tracing
C) alpha checking
D) beta checking
Question
The default radio button is designated by setting the Checked property to a value of True.
Question
The condition in a multiple-path selection structure is represented by a ____ in a flowchart.

A) diamond
B) square
C) circle
D) rectangle
Question
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.
Question
A selection structure that can choose from several alternatives is called a(n)____ selection structure.

A) dynamic
B) complex
C) secondary
D) extended
Question
When either a selection structure's true path or its false path contains another selection structure,the inner selection structure is referred to as a ____ selection structure.

A) complex
B) primary
C) nested
D) combined
Question
An unnecessary selection structure within a nested selection structure will make the program inefficient.
Question
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
Question
In a nested selection structure,the ____ decision is always made by the outer selection structure.

A) primary
B) secondary
C) binary
D) linear
Question
In a nested selection structure,the ____ decision is always made by the inner selection structure.

A) primary
B) secondary
C) binary
D) linear
Question
The If/ElseIf/Else selection structure needs only one End If statement to mark the end of the selection structure.
Question
The Select Case statement ends with the ____ clause.

A) End
B) End Case
C) End Select
D) Select End
Question
In a Case selection structure,the expression Case Is 10 To 5 would be an incorrectly formed case statement.
Question
If the intQuantity variable contains the number 10 and the customer is a member,what value will be in the decTotal variable after the code is processed?

A) 0
B) 125
C) 140
D) 150
Question
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
Question
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
Question
If the intQuantity variable contains the number 20 and the customer is a member,what value will be in the decTotal variable after the code is processed?

A) 187.50
B) 250
C) 280
D) 300
Question
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
Question
If the intQuantity variable contains the number 25 and the customer is not a member,what value will be in the decTotal variable after the code is processed?

A) 0
B) 312.50
C) 350
D) 375
Question
The ____ event occurs each time you select or deselect a check box or radio button.

A) Checked
B) Changed
C) CheckedChanged
D) ChangedChecked
Question
You create the Random object by declaring it in a ____ statement.

A) Get
B) Dim
C) Sub
D) Private
Question
An online bookseller uses the following schedule to determine the shipping costs: <strong>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?</strong> A) Case Is < 7 B) Case 4 To 7 C) Case Is 4 To 7 D) Case Between 4 and 7 <div style=padding-top: 35px> What is a correct case expression for a category II book order based upon Books Ordered?

A) Case Is < 7
B) Case 4 To 7
C) Case Is 4 To 7
D) Case Between 4 and 7
Question
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
Question
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)
Question
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 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?  <div style=padding-top: 35px>
Question
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
Question
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
Question
The maximum number of radio buttons that can be selected from a group is ____.

A) one
B) three
C) five
D) seven
Question
Which of the following conditions will evaluate to True when the chkValidID check box is not selected? Which of the following conditions will evaluate to True when the chkValidID check box is not selected?  <div style=padding-top: 35px>
Question
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
Question
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
Question
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
Question
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
Question
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.
Question
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.
Question
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
Question
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:
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:  <div style=padding-top: 35px>
Question
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.
Question
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.
Question
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.
Question
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.
Question
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.
Question
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.
Question
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.
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.   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.<div style=padding-top: 35px> 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.
Question
What is a nested selection structure? How do primary and secondary decisions relate to a nested selection structure?
Question
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
Question
Define the term "algorithm." How is desk-checking used to verify algorithms?
Question
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.
Question
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? 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?  <div style=padding-top: 35px>
Unlock Deck
Sign up to unlock the cards in this deck!
Unlock Deck
Unlock Deck
1/56
auto play flashcards
Play
simple tutorial
Full screen (f)
exit full mode
Deck 5: More on the Selection Structure
1
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
C
2
In a Case selection structure,each expression in an expression list is separated by a ____.

A) semicolon (;)
B) colon (:)
C) period (. )
D) comma (,)
D
3
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.
False
4
In a nested selection structure,the primary decision is always made by the outer selection structure.
Unlock Deck
Unlock for access to all 56 flashcards in this deck.
Unlock Deck
k this deck
5
When a user selects a second CheckBox in a group,previously selected CheckBox items are deselected.
Unlock Deck
Unlock for access to all 56 flashcards in this deck.
Unlock Deck
k this deck
6
The minimum number of radio buttons in a group is one.
Unlock Deck
Unlock for access to all 56 flashcards in this deck.
Unlock Deck
k this deck
7
You can hide a control on a form while an application is running by changing the Visible property from False to True.
Unlock Deck
Unlock for access to all 56 flashcards in this deck.
Unlock Deck
k this deck
8
Desk-checking is also called ____.

A) prototyping
B) hand-tracing
C) alpha checking
D) beta checking
Unlock Deck
Unlock for access to all 56 flashcards in this deck.
Unlock Deck
k this deck
9
The default radio button is designated by setting the Checked property to a value of True.
Unlock Deck
Unlock for access to all 56 flashcards in this deck.
Unlock Deck
k this deck
10
The condition in a multiple-path selection structure is represented by a ____ in a flowchart.

A) diamond
B) square
C) circle
D) rectangle
Unlock Deck
Unlock for access to all 56 flashcards in this deck.
Unlock Deck
k this deck
11
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.
Unlock Deck
Unlock for access to all 56 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
Unlock Deck
Unlock for access to all 56 flashcards in this deck.
Unlock Deck
k this deck
13
When either a selection structure's true path or its false path contains another selection structure,the inner selection structure is referred to as a ____ selection structure.

A) complex
B) primary
C) nested
D) combined
Unlock Deck
Unlock for access to all 56 flashcards in this deck.
Unlock Deck
k this deck
14
An unnecessary selection structure within a nested selection structure will make the program inefficient.
Unlock Deck
Unlock for access to all 56 flashcards in this deck.
Unlock Deck
k this deck
15
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
Unlock Deck
Unlock for access to all 56 flashcards in this deck.
Unlock Deck
k this deck
16
In a nested selection structure,the ____ decision is always made by the outer selection structure.

A) primary
B) secondary
C) binary
D) linear
Unlock Deck
Unlock for access to all 56 flashcards in this deck.
Unlock Deck
k this deck
17
In a nested selection structure,the ____ decision is always made by the inner selection structure.

A) primary
B) secondary
C) binary
D) linear
Unlock Deck
Unlock for access to all 56 flashcards in this deck.
Unlock Deck
k this deck
18
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 56 flashcards in this deck.
Unlock Deck
k this deck
19
The Select Case statement ends with the ____ clause.

A) End
B) End Case
C) End Select
D) Select End
Unlock Deck
Unlock for access to all 56 flashcards in this deck.
Unlock Deck
k this deck
20
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 56 flashcards in this deck.
Unlock Deck
k this deck
21
If the intQuantity variable contains the number 10 and the customer is a member,what value will be in the decTotal variable after the code is processed?

A) 0
B) 125
C) 140
D) 150
Unlock Deck
Unlock for access to all 56 flashcards in this deck.
Unlock Deck
k this deck
22
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
Unlock Deck
Unlock for access to all 56 flashcards in this deck.
Unlock Deck
k this deck
23
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
Unlock Deck
Unlock for access to all 56 flashcards in this deck.
Unlock Deck
k this deck
24
If the intQuantity variable contains the number 20 and the customer is a member,what value will be in the decTotal variable after the code is processed?

A) 187.50
B) 250
C) 280
D) 300
Unlock Deck
Unlock for access to all 56 flashcards in this deck.
Unlock Deck
k this deck
25
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
Unlock Deck
Unlock for access to all 56 flashcards in this deck.
Unlock Deck
k this deck
26
If the intQuantity variable contains the number 25 and the customer is not a member,what value will be in the decTotal variable after the code is processed?

A) 0
B) 312.50
C) 350
D) 375
Unlock Deck
Unlock for access to all 56 flashcards in this deck.
Unlock Deck
k this deck
27
The ____ event occurs each time you select or deselect a check box or radio button.

A) Checked
B) Changed
C) CheckedChanged
D) ChangedChecked
Unlock Deck
Unlock for access to all 56 flashcards in this deck.
Unlock Deck
k this deck
28
You create the Random object by declaring it in a ____ statement.

A) Get
B) Dim
C) Sub
D) Private
Unlock Deck
Unlock for access to all 56 flashcards in this deck.
Unlock Deck
k this deck
29
An online bookseller uses the following schedule to determine the shipping costs: <strong>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?</strong> A) Case Is < 7 B) Case 4 To 7 C) Case Is 4 To 7 D) Case Between 4 and 7 What is a correct case expression for a category II book order based upon Books Ordered?

A) Case Is < 7
B) Case 4 To 7
C) Case Is 4 To 7
D) Case Between 4 and 7
Unlock Deck
Unlock for access to all 56 flashcards in this deck.
Unlock Deck
k this deck
30
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
Unlock Deck
Unlock for access to all 56 flashcards in this deck.
Unlock Deck
k this deck
31
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)
Unlock Deck
Unlock for access to all 56 flashcards in this deck.
Unlock Deck
k this deck
32
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 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?
Unlock Deck
Unlock for access to all 56 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
Unlock Deck
Unlock for access to all 56 flashcards in this deck.
Unlock Deck
k this deck
34
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 56 flashcards in this deck.
Unlock Deck
k this deck
35
The maximum number of radio buttons that can be selected from a group is ____.

A) one
B) three
C) five
D) seven
Unlock Deck
Unlock for access to all 56 flashcards in this deck.
Unlock Deck
k this deck
36
Which of the following conditions will evaluate to True when the chkValidID check box is not selected? Which of the following conditions will evaluate to True when the chkValidID check box is not selected?
Unlock Deck
Unlock for access to all 56 flashcards in this deck.
Unlock Deck
k this deck
37
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 56 flashcards in this deck.
Unlock Deck
k this deck
38
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
Unlock Deck
Unlock for access to all 56 flashcards in this deck.
Unlock Deck
k this deck
39
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
Unlock Deck
Unlock for access to all 56 flashcards in this deck.
Unlock Deck
k this deck
40
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
Unlock Deck
Unlock for access to all 56 flashcards in this deck.
Unlock Deck
k this deck
41
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 56 flashcards in this deck.
Unlock Deck
k this deck
42
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 56 flashcards in this deck.
Unlock Deck
k this deck
43
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 56 flashcards in this deck.
Unlock Deck
k this deck
44
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:
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:
Unlock Deck
Unlock for access to all 56 flashcards in this deck.
Unlock Deck
k this deck
45
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 56 flashcards in this deck.
Unlock Deck
k this deck
46
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 56 flashcards in this deck.
Unlock Deck
k this deck
47
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 56 flashcards in this deck.
Unlock Deck
k this deck
48
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 56 flashcards in this deck.
Unlock Deck
k this deck
49
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 56 flashcards in this deck.
Unlock Deck
k this deck
50
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 56 flashcards in this deck.
Unlock Deck
k this deck
51
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.
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.   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. 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 56 flashcards in this deck.
Unlock Deck
k this deck
52
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 56 flashcards in this deck.
Unlock Deck
k this deck
53
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 56 flashcards in this deck.
Unlock Deck
k this deck
54
Define the term "algorithm." How is desk-checking used to verify algorithms?
Unlock Deck
Unlock for access to all 56 flashcards in this deck.
Unlock Deck
k this deck
55
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 56 flashcards in this deck.
Unlock Deck
k this deck
56
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? 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?
Unlock Deck
Unlock for access to all 56 flashcards in this deck.
Unlock Deck
k this deck
locked card icon
Unlock Deck
Unlock for access to all 56 flashcards in this deck.