Exam 5: More on the Selection Structure

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

The price chart for Trent Wholesale is shown below.Rewrite the incorrect statements in the associated code to correct all errors. Quantity Ordered Frice per Item 1-10 \ 12 11-20 \ 11 More than 20 \ 9 Less than 1 \ 0 Case Select intQuantity Case < 10 intPrice = 12 Case Is 11 - 20 intPrice = 11 Case > 20 intPrice = 9 Case Else intPrice = 0 End Select

(Essay)
4.8/5
(33)

What is a nested selection structure? How do primary and secondary decisions relate to a nested selection structure?

(Essay)
4.7/5
(29)

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.

(Essay)
4.7/5
(26)

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.

(Multiple Choice)
4.9/5
(24)

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.

(Essay)
4.8/5
(39)

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) \quad \quad $135\$ 135 Monday (M), Wednesday (W)( W ) , and Friday (F) \quad \quad $120\$ 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

(Essay)
4.8/5
(34)

You enter the label for a radio button using sentence capitalization in the radio button's ____ property.

(Multiple Choice)
4.9/5
(39)

The condition in a multiple-path selection structure is represented by a ____ in a flowchart.

(Multiple Choice)
4.8/5
(28)

When the Select Case statement includes a Case ____ clause,this clause must be the last clause in the statement.

(Multiple Choice)
4.8/5
(31)

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

(Multiple Choice)
4.9/5
(30)

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.

(Essay)
4.7/5
(33)

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

(Multiple Choice)
4.9/5
(27)

Which of the following would be an appropriate use of a check box control?

(Multiple Choice)
4.9/5
(31)

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/False)
4.8/5
(32)

When a user selects a second CheckBox in a group,previously selected CheckBox items are deselected.

(True/False)
4.7/5
(35)

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

(Multiple Choice)
5.0/5
(30)

When a check box is selected,its Checked property contains the ____.

(Multiple Choice)
4.9/5
(35)

The ____ event occurs each time you select or deselect a check box or radio button.

(Multiple Choice)
4.9/5
(34)

In a nested selection structure,the primary decision is always made by the outer selection structure.

(True/False)
4.8/5
(30)

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.

(Short Answer)
4.8/5
(35)
Showing 21 - 40 of 58
close modal

Filters

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