Starting Out with Programming Logic and Design (4th Edition)
4th Edition
ISBN: 9780133985078
Author: Tony Gaddis
Publisher: PEARSON
expand_more
expand_more
format_list_bulleted
Textbook Question
Chapter 4.5, Problem 4.20CP
You need to write a multiple alternative decision structure, but the language you are using will not allow you to perform the test you need in a Select Case statement. What can you do to achieve the same results?
Expert Solution & Answer
Trending nowThis is a popular solution!
Students have asked these similar questions
Questions about Decision Structure
What is the significance of using control structures?
For you, which is preferably the most convenient control structure to be used in comparisons, IF-ELSE or SWITCH?
Do SWITCH and IF-ELSE have differences?
Lining up your curly braces when using decision structures not only makes it easier to read and catch matching curly braces but it will also make your code run more efficiently. True or false?
What are the key differences between black box and white box testing? When do you use the different methods of testing?
Chapter 4 Solutions
Starting Out with Programming Logic and Design (4th Edition)
Ch. 4.1 - What is a control structure?Ch. 4.1 - What is a decision structure?Ch. 4.1 - Prob. 4.3CPCh. 4.1 - Prob. 4.4CPCh. 4.1 - What types of relationships between values can you...Ch. 4.1 - Write a pseudocode If-Then statement that assigns...Ch. 4.1 - Write a pseudocode If-Then statement that assigns...Ch. 4.2 - Prob. 4.8CPCh. 4.2 - What statement do you use in pseudocode to write a...Ch. 4.2 - When you write an If-Then-Else statement, under...
Ch. 4.3 - If the following pseudocode were an actual...Ch. 4.3 - If the following pseudocode were an actual...Ch. 4.4 - Prob. 4.13CPCh. 4.4 - What statement do you use in pseudocode to write a...Ch. 4.4 - When you write an If-Then-Else statement, under...Ch. 4.4 - Convert the following pseudocode to an...Ch. 4.5 - Prob. 4.17CPCh. 4.5 - How do you write a multiple alternative decision...Ch. 4.5 - What does the case structure test, in order to...Ch. 4.5 - You need to write a multiple alternative decision...Ch. 4.6 - Prob. 4.21CPCh. 4.6 - Prob. 4.22CPCh. 4.6 - Assume the variables a = 2, b = 4, and c = 6....Ch. 4.6 - Explain how short-circuit evaluation works with...Ch. 4.6 - Prob. 4.25CPCh. 4.6 - Write an If-Then statement that displays the...Ch. 4.7 - Prob. 4.27CPCh. 4.7 - What is a flag variable?Ch. 4 - A __ structure can execute a set of statements...Ch. 4 - A __ structure provides one alternative path of...Ch. 4 - In pseudocode, the If-Then statement is an example...Ch. 4 - A(n) __ expression has a value of either true or...Ch. 4 - The symbols,, and== are all __ operators. a....Ch. 4 - A(n) __ structure tests a condition and then takes...Ch. 4 - You use a(n) __ statement in pseudocode to write a...Ch. 4 - You use a(n) _________ statement in pseudocode to...Ch. 4 - A ______ structure allows you to test the value of...Ch. 4 - Prob. 10MCCh. 4 - AND, OR, and NOT are _____ operators. a....Ch. 4 - A compound Boolean expression created with the...Ch. 4 - A compound Boolean expression created with the...Ch. 4 - The ____ operator takes a Boolean expression as...Ch. 4 - A ________ is a Boolean variable that signals when...Ch. 4 - Prob. 1TFCh. 4 - A program can be made of only one type of control...Ch. 4 - A single alternative decision structure tests a...Ch. 4 - A decision structure can be nested inside another...Ch. 4 - A compound Boolean expression created with the AND...Ch. 4 - Explain what is meant by the term conditionally...Ch. 4 - You need to test a condition and then execute one...Ch. 4 - If you need to test the value of a variable and...Ch. 4 - Briefly describe how the AND operator works.Ch. 4 - Briefly describe how the OR operator works.Ch. 4 - Prob. 6SACh. 4 - What is a flag and how does it work?Ch. 4 - Design an If-Then statement (or a flowchart with a...Ch. 4 - Design an If- Then statement (or a flowchart with...Ch. 4 - Design an If- Then-Else statement (or a flowchart...Ch. 4 - The following pseudocode contains several nested...Ch. 4 - Design nested decision structures that perform the...Ch. 4 - Rewrite the following If-Then-Else If statement as...Ch. 4 - Design an If-Then-Else statement (or a flowchart...Ch. 4 - Design an If-Then-Else statement (or a flowchart...Ch. 4 - Design a case structure that tests the month...Ch. 4 - Write an If-Then statement that sets the variable...Ch. 4 - Part of the following pseudocode is incompatible...Ch. 4 - Prob. 2DECh. 4 - Prob. 3DECh. 4 - Roman Numerals Design a program that prompts the...Ch. 4 - Areas of Rectangles The area of a rectangle is the...Ch. 4 - Mass and Weight Scientists measure an objects mass...Ch. 4 - Magic Dates The date June 10, 1960, is special...Ch. 4 - Color Mixer The colors red, blue, and yellow are...Ch. 4 - Book Club Points Serendipity Booksellers has a...Ch. 4 - Software Sales A software company sells a package...Ch. 4 - Change for a Dollar Game Design a change-counting...Ch. 4 - Shipping Charges The Fast Freight Shipping Company...Ch. 4 - Body Mass Index Program Enhancement In Programming...Ch. 4 - Time Calculator Design a program that asks the...
Additional Engineering Textbook Solutions
Find more solutions based on key concepts
A file that contains a Flash animation uses the __________ file extension. a. .class b. .swf c. .mp3 d. .flash
Web Development and Design Foundations with HTML5 (8th Edition)
What are some features of specific programming languages you know whose rationales are a mystery to you?
Concepts of Programming Languages (11th Edition)
Assume choice references a string. The following if statement determines whether choice is equal to Y or y: if ...
Starting Out with Python (3rd Edition)
For this exercise, we will examine the code generated by GCC for functions that have structures as arguments an...
Computer Systems: A Programmer's Perspective (3rd Edition)
Write an iterative version of the function cheers defined in Self-Test Exercise 1.
Problem Solving with C++ (10th Edition)
How do you create a relationship between radio menu items so only one may be selected at a time?
Starting Out with Java: Early Objects (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
- You can use the selection structures in this chapter interchangeably for many circumstances. There are a few occasions when one is clearly preferable to another based on input data. Some of these situations were touched on in the switch statement discussion. Review these, give an overview of all of the selection structures discussed in the chapter, and then discuss how to determine which structure to use when there is no clear indication. How much of the choice should be based on personal preference and how much on conventional practices? Are there performance issues as well?arrow_forward1. What is the significance of using control structures? 2. For you, which is is preferably the most convenient control structure to be used in comparisons, IF-ELSE or SWITCH? 3. Do SWITCH and IF-ELSE have differences?arrow_forwardNonearrow_forward
- Create any game of your choosing in MATLAB that uses at least one if statement and one switch statement. Make sure to print the rules of the game beforehand. You will get points on how fun and how complex your game is with a maximum of 4 points. A game that does not work or does not meet the conditions above will not get any points. Make sure to include the comment section to document what your program is doing. Feel free to organize your code in any way that is suitable and easy to follow.arrow_forwardWhat do you understand by programming style? What are general rules for good programming style?arrow_forwardA technical phrase is bindingNavigator control. Why do you say that, exactly?arrow_forward
- What do you think is the most important thing for a tester?arrow_forwardIs it conceivable for a single operation to get obstructed while being executed? It is anticipated that your comments would include reasoning.arrow_forwardThe systems analysts are developing the test plan for the user interface for the Holiday Travel Vehicles system. As the salespeople are entering a sales invoice into the system, they will be able to enter an option code into a text box or to select an option code from a drop-down list. A combo box was used to implement this, because it was felt that the salespeople would quickly become familiar with the most common option codes and would prefer entering them directly to speed up the entry process. It is now time to develop the test for validating the option code fi eld during data entry. If the customer did not request any dealer-installed options for the vehicle, the salesperson should enter "none"; the field should not be blank. The valid option codes are four-character alphabetic codes and should be matched against a list of valid codes. For the Holiday Travel Vehicles problem: a. Prepare a test plan for the test of the option code field during data entry. b. Prepare a plan to…arrow_forward
- I'm asking for help with different perspectives on purpose. Also, you do not have to complete the code, I’m posting the entire question in order for the question to be clear. Sorry if you see this question ask more than once. Objectives: The main objective of this assignment is to assess the student’s ability to provide a complete Black-Box testing plan for a computer program. Description: you will need to design a complete Black-Box testing plan for the following program. Instead of changing passwords every semester, students will now change passwords once a month. Unfortunately, the school has realized that many students are bad at picking their passwords. Ideally, passwords alternate between letters, numbers, and symbols. However, most students and faculty pick passwords such as “12345password”. To make matters worse, when students and faculty are forced to change their password, usually only a single character is added to the end of their previous password. Due to this…arrow_forwardIt is not sufficient to declare a variable using the word "type" alone. Identifiers may be derived from a variable's data type as well as other aspects of its makeup. The next thing that has to be done is to find out how to characterise any given variable by employing this concept.arrow_forwardThere are a large variety of models used in software development, and the value of each model varies based on the application. Could you please arrange out the models?arrow_forward
arrow_back_ios
SEE MORE QUESTIONS
arrow_forward_ios
Recommended textbooks for you
Structured Chart; Author: Tutorials Point (India) Ltd.;https://www.youtube.com/watch?v=vdUO-sGA1DA;License: Standard YouTube License, CC-BY
Introduction to Structure Charts; Author: Christopher Kalodikis;https://www.youtube.com/watch?v=QN2bjNplGlQ;License: Standard Youtube License