Exam 5: More on the Selection Structure

arrow
  • Select Tags
search iconSearch Question
flashcardsStudy Flashcards
  • Select Tags

After creating a Random object,you can generate random integers using the ____ method.

Free
(Multiple Choice)
4.8/5
(34)
Correct Answer:
Verified

D

When the programmer wants to limit the user to one choice during input of mutually exclusive options,the ____ control should be used.

Free
(Multiple Choice)
4.8/5
(40)
Correct Answer:
Verified

C

Which of the following conditions will evaluate to True when the chkValidID check box is not selected?

Free
(Multiple Choice)
4.8/5
(24)
Correct Answer:
Verified

D

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 ____.

(Multiple Choice)
4.9/5
(45)

You create the Random object by declaring it in a ____ statement.

(Multiple Choice)
4.8/5
(33)

The If/ElseIf/Else selection structure needs only one End If statement to mark the end of the selection structure.

(True/False)
4.9/5
(31)

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?

(Multiple Choice)
4.9/5
(41)

A selection structure that can choose from several alternatives is called a(n)____ selection structure.

(Multiple Choice)
4.8/5
(32)

The maximum number of radio buttons that can be selected from a group is ____.

(Multiple Choice)
4.8/5
(34)

In a Case selection structure,each expression in an expression list is separated by a ____.

(Multiple Choice)
4.8/5
(28)

In a nested selection structure,the ____ decision is always made by the inner selection structure.

(Multiple Choice)
4.9/5
(34)

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.

(Essay)
4.9/5
(35)

In a Case selection structure,you use the ____ keyword when you know both the upper and lower bounds of the range.

(Multiple Choice)
4.8/5
(34)

The minimum number of radio buttons in a group is one.

(True/False)
4.7/5
(32)

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?

(Multiple Choice)
4.7/5
(35)

  -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? -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?

(Multiple Choice)
4.8/5
(31)

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.

(True/False)
4.8/5
(41)

An unnecessary selection structure within a nested selection structure will make the program inefficient.

(True/False)
4.8/5
(34)

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?

(Multiple Choice)
4.8/5
(45)

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.

(Essay)
4.8/5
(40)
Showing 1 - 20 of 58
close modal

Filters

  • Essay(0)
  • Multiple Choice(0)
  • Short Answer(0)
  • True False(0)
  • Matching(0)