All Matches
Solution Library
Expert Answer
Textbooks
Search Textbook questions, tutors and Books
Oops, something went wrong!
Change your search query and then try again
Toggle navigation
FREE Trial
S
Books
FREE
Tutors
Study Help
Expert Questions
Accounting
General Management
Mathematics
Finance
Organizational Behaviour
Law
Physics
Operating System
Management Leadership
Sociology
Programming
Marketing
Database
Computer Network
Economics
Textbooks Solutions
Accounting
Managerial Accounting
Management Leadership
Cost Accounting
Statistics
Business Law
Corporate Finance
Finance
Economics
Auditing
Hire a Tutor
AI Tutor
New
Search
Search
Sign In
Register
study help
computer science
programming logic & design
Questions and Answers of
Programming Logic & Design
Each of the flowchart segments in Figure 3-24 is unstructured. Redraw each segment so that it does the same processes under the same conditions, but is structured. a. D Yes NO Yes B? E? No F H C. Yes
In Figure 3-10, the process of buying and planting flowers in the spring was shown using the same structures as the generic example in Figure 3-9. Use the same logical structure as in Figure 3-9 to
Which of the following is true of structured logic?a. You can use structured logic with newer programming languages, such as Java and C#, but not with older ones.b. Any task can be described using
Which of the following is not a benefit of modularizing programs?a. Modular programs are easier to read and understand than nonmodular ones.b. If you use modules, you can ignore the rules of
Which of the following is not a reason for enforcing structure rules in computer programs?a. Structured programs are clearer to understand than unstructured ones.b. Other professional programmers
When a loop executes, the structure-controlling condition is ______________.a. Tested exactly onceb. Never tested more than oncec. Tested either before or after the loop body executesd. tested only
In a selection structure, the structure-controlling condition is______________.a. Tested once at the beginning of the structureb. Tested once at the end of the structurec. Tested repeatedly until it
Which of the following is acceptable in a structured program?a. Placing a sequence within the true branch of a dual-alternative decisionb. Placing a decision within a loopc. Placing a loop within one
A group of statements that executes as a unit is a _____________.a. Blockb. Familyc. Chunkd. Cohort
When you input data in a loop within a program, the input statement that precedes the loop _____________.a. Is the only part of the program allowed to be unstructuredb. Cannot result in eofc. Is
Which is true of stacking structures?a. Two incidences of the same structure cannot be stacked adjacently.b. When you stack structures, you cannot nest them in the same program.c. Each structure has
Which of the following attributes do all three basic structures share?a. Their flowcharts all contain exactly three processing symbols.b. They all begin with a process.c. They all have one entry and
When you must perform one action when a condition is true and a different one when it is false, you use a _____________.a. Sequenceb. Loopc. Dual-alternative selectiond. Single-alternative selection
To take action as long as a condition remains true, you use a _____________.a. Sequenceb. Stackc. Loopd. Selection
When an action is required if a condition is true, but no action is needed if it is false, you use a _____________.a. Sequenceb. Loopc. Dual-alternative selectiond. Single-alternative selection
Attaching structures end to end is called _____________.a. Nestingb. Untanglingc. Buildingd. Stacking
Placing a structure within another structure is called the _____________ structures.a. Untanglingb. Nestingc. Buildingd. Stacking
A _____ expression has one of two values, often expressed as true or false.a. Georgianb. Booleanc. Selectiond. Caesarian
Which of the following is not another term for a selection structure?a. Loop structureb. Decision structurec. Dual-alternative if structured. If-then-else structure
A sequence structure can contain _____________.a. Only one taskb. Exactly three tasksc. No more than three tasksd. Any number of tasks
The three structures of structured programming are _____________.a. Sequence, selection, and loopb. Decision, loop, and iterationc. Sequence, order, and processd. Loop, iteration, and refraction
Snarled program logic is called _____________ code.a. Snakeb. Spaghettic. Linguinid. Gnarly
Create a flowchart or pseudocode that shows the logic for a program that generates a random number, then asks the user to think of a number between 1 and 10. Then display the randomly generated
Your downloadable files for Chapter 2 include a file named DEBUG02-04.jpg that contains a flowchart with syntax and/or logical errors. Examine the flowchart and then find and correct all the bugs.
Your downloadable files for Chapter 2 include DEBUG02-01.txt, DEBUG02-02. txt, and DEBUG02-03.txt. Each file starts with some comments that describe the problem. Comments are lines that begin with
A file named MAINTENANCE02-01.txt is included with your downloadable student files. Assume that this program is a working program in your organization and that it needs modifications as described in
Draw the hierarchy chart and design the logic for a program for Arnie’s Appliances. Design a program that prompts the user for a refrigerator model name and the interior height, width, and depth in
a. Draw the hierarchy chart and design the logic for a program needed by the manager of the Stengel County softball team, who wants to compute slugging percentages for his players. A slugging
Draw the hierarchy chart and design the logic for a program that calculates the projected cost of a remodeling project. Assume that the labor cost is $30 per hour. Design a program that prompts the
Draw the hierarchy chart and design the logic for a program that calculates service charges for Hazel’s Housecleaning service. The program contains housekeeping, detail loop, and end-of-job
a. Draw the hierarchy chart and then plan the logic for a program that calculates a person’s body mass index (BMI). BMI is a statistical measure that compares a person’s weight and height. The
a. Draw the hierarchy chart and then plan the logic for a program needed by Hometown Bank. The program determines a monthly checking account fee. Input includes an account balance and the number of
Draw a typical hierarchy chart for a program that produces a monthly bill for a cell phone customer. Try to think of at least 10 separate modules that might be included. For example, one module might
Assume that speed = 10 and miles = 5. What is the value of each of the following expressions?
If productCost and productPrice are numeric variables, and productName is a string variable, which of the following statements are valid assignments? If a statement is not valid, explain why not.
Explain why each of the following names does or does not seem like a good variable name to you.
A message that asks a user for input is a(n) ___________.a. Eommentb. Echoc. Promptd. Declaration
Which of the following is valid advice for naming variables?a. To save typing, make most variable names one or two letters.b. To avoid conflict with names that others are using, use unusual or
Program comments are ___________.a. Required to create a runnable programb. A form of external documentationc. Both of the aboved. None of the above
What are nonexecuting statements that programmers place within code to explain program statements in English?a. Pseudocodeb. Triviac. User documentationd. Comments
A hierarchy chart tells you ___________.a. Which modules call other modulesb. What tasks are to be performed within each program modulec. When a module executesd. All of the above
Which module in a typical program will execute the most times?a. The housekeeping moduleb. The detail loopc. The end-of-job moduled. It is different in every program.
Which of the following is not a typical housekeeping task?a. Displaying instructionsb. Printing summariesc. Opening filesd. Displaying report headings
In most modern programming languages, a variable or constant that is declared in a module is ___________ in that module.a. Globalb. Invisiblec. In scoped. Undefined
The more that a module’s statements contribute to the same job, the greater the ___________ of the module.a. Structureb. Modularityc. Functional cohesiond. Size
Programmers say that one module can ___________ another, meaning that the first module causes the second module to execute.a. Declareb. Definec. Enactd. Call
Every module has all of the following except___________ .a. A headerb. Local variablesc. A bodyd. A return statement
What is the name for the process of paying attention to important properties while ignoring nonessential details?a. Abstractionb. Extractionc. Extinctiond. Modularization
Modularization _____.a. Eliminates abstractionb. Reduces overheadc. Facilitates reusabilityd. Increases the need for correct syntax
Which of the following is not a term used as a synonym for module?a. Methodb. Objectc. Procedured. Subroutine
Multiplication has a lower precedence than _____.a. Divisionb. Subtractionc. Assignmentd. None of the above
The assignment operator ___________.a. Is a binary operatorb. Has left-to-right associativityc. Is most often represented by a colond. Two of the above
The value 3 is a ___________.a. Numeric variableb. String variablec. Numeric constantd. String constant
The value stored in an uninitialized variable is _________.a. Nullb. Garbagec. Compostd. Its identifier
A variable’s data type describes all of the following except________.a. What values the variable can holdb. The scope of the variablec. How the variable is stored in memoryd. What operations can be
What does a declaration provide for a variable?a. A nameb. A data typec. Both of the aboved. None of the above
Create the logic for a Mad Lib program that accepts five words from input, then creates and displays a short story or nursery rhyme that uses them.
Your downloadable files for Chapter 1 include a file named DEBUG01-04.jpg that contains a flowchart that contains syntax and/or logical errors. Examine the flowchart and then find and correct all the
Your downloadable files for Chapter 1 include DEBUG01-01.txt, DEBUG01-02.txt, and DEBUG01-03.txt. Each file starts with some comments (lines that begin with two slashes) that describe the program.
Showing 400 - 500
of 459
1
2
3
4
5