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
Concept explainers
Textbook Question
Chapter 7, Problem 4SA
In this chapter you saw how a posttest loop can be used in input validation, as an alternative to the priming read followed by a pretest loop. Why is it typically not best to use a posttest loop approach?
Expert Solution & Answer
Want to see the full answer?
Check out a sample textbook solutionStudents have asked these similar questions
Is it feasible to modularize input validation using Boolean methods? Why is this happening, or why is it not happening?
Is it feasible to modularise input validation by using Boolean methods? What is
the rationale for this or why is it not the case?
ijg
Describe in detail three things that you may attempt if you have completed the debugging procedure but are still unable to resolve the issue.
Chapter 7 Solutions
Starting Out with Programming Logic and Design (4th Edition)
Ch. 7.1 - What does the phrase garbage in, garbage out mean?Ch. 7.1 - Give a general description of the input validation...Ch. 7.2 - Describe the steps that are generally taken when...Ch. 7.2 - Prob. 7.4CPCh. 7.2 - If the input that is read by the priming read is...Ch. 7 - GIGO stands for a. great input, great output b....Ch. 7 - The integrity of a programs output is only as good...Ch. 7 - The input operation that appears just before a...Ch. 7 - Validation loops are also known as a. error traps...Ch. 7 - The term empty input describes what happens when...
Ch. 7 - The process of input validation works like this:...Ch. 7 - The priming read appears inside the validation...Ch. 7 - The approach of using a posttest validation loop...Ch. 7 - What does the phrase garbage in, garbage out mean?Ch. 7 - Give a general description of the input validation...Ch. 7 - Prob. 3SACh. 7 - In this chapter you saw how a posttest loop can be...Ch. 7 - Design an algorithm that prompts the user to enter...Ch. 7 - Design an algorithm that prompts the user to enter...Ch. 7 - Design an algorithm that prompts the user to enter...Ch. 7 - Design an algorithm that prompts the user to enter...Ch. 7 - Design an algorithm that prompts the user to enter...Ch. 7 - Prob. 1DECh. 7 - Why does the following pseudocode not perform as...Ch. 7 - The following pseudocode works, but it performs a...Ch. 7 - Payroll Program with Input Validation Design a...Ch. 7 - Theater Seating Revenue with Input Validation A...Ch. 7 - Fat Gram Calculator Design a program that asks for...Ch. 7 - Speeding Violation Calculator Design a program...Ch. 7 - Rock, Paper, Scissors Modification Programming...
Additional Engineering Textbook Solutions
Find more solutions based on key concepts
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 a function named firstLast2 that takes as input a vector of integers. The function should return true if ...
Problem Solving with C++ (9th Edition)
Fishing Game Simulation For this assignment, you will write a program that simulates a fishing game, in this ga...
Starting Out with Java: From Control Structures through Objects (7th Edition) (What's New in Computer Science)
Write the header for a method named send that has one parameter of type String, and does not return a value.
Objects First with Java: A Practical Introduction Using BlueJ (6th Edition)
Describe a method that can be used to gather a piece of data such as the users age.
Web Development and Design Foundations with HTML5 (9th Edition) (What's New in Computer Science)
Demonstrate each of the anomaly types with an example.
Modern Database Management
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
- What exactly does it mean for something to be "debugged"? In what way does this relate to the testing that takes place?arrow_forwardCan Boolean methods be used to modularize input validation? Why or why not?arrow_forwardGive an example of a while loop, then provide the equivalent do-while loop and for loop. Then give a different example of a do-while loop, along with the equivalent while loop and for loop. Finally, give an example of a for loop, along with the equivalent while loop and do-while loop. Use your examples to illustrate the advantages and disadvantages of each looping structure, and describe those advantages and disadvantages.arrow_forward
- What is the precise function of debugging, and how does it work in practise? How does this information pertain to the evaluation process?arrow_forwardQUESTION 8 If we wanted something like the python else statement for a counter controlled loop in Java, what would it look like? We simply check either break or continue flags to see if either is set We simply check break variable to see if used. we check the for flag to see if loop terminated correctly Since there is no way for a loop in Java to tell you if it completed without breaks or continues, you'd need to set a boolean flag to indicate that and check it after the loop was completed.arrow_forwardWhat are the challenges with logically controlled loop statements in terms of design?arrow_forward
- Q2:C has many statements for decisions and loops, while MIPS has few. What are the pros and cons for having more or less decision/loop statements? Please give several detailed examples.arrow_forwardExplain in detail three things you can try if you have followed the debugging process and are still unable to fix the problem.arrow_forwardTo what end does debugging work, and how does it do so? What does this have to do with testing, if anything?arrow_forward
- A criticism of the break and continue statements is that each is unstructured. These statements can always be replaced by structured statements. Describe in general how you’d remove any break statement from a loop in a program and replace it with some structured equivalent. [Hint: The break statement leaves a loop from within the body ofthe loop. Another way to leave is by failing the loop-continuation test. Consider using in theloop-continuation test a second test that indicates “early exit because of a ‘break’ condition.”] Use the technique you developed here to remove the break statement from the program of Fig. 5.13.arrow_forwardConsider the following common task done repeatedly:• Read the next input (x = read())• If the input is not valid (valid(x)), exit the loop• Print the input read (print(x))• Repeat the loopUsing C++ syntax:Write the loop above using a pretest loop, posttest loop and a user-located loop control mechanism. From the three which one is more readable and why?arrow_forwardlanguage is c++arrow_forward
arrow_back_ios
SEE MORE QUESTIONS
arrow_forward_ios
Recommended textbooks for you
- Microsoft Visual C#Computer ScienceISBN:9781337102100Author:Joyce, Farrell.Publisher:Cengage Learning,Programming Logic & Design ComprehensiveComputer ScienceISBN:9781337669405Author:FARRELLPublisher:CengageC++ for Engineers and ScientistsComputer ScienceISBN:9781133187844Author:Bronson, Gary J.Publisher:Course Technology Ptr
Microsoft Visual C#
Computer Science
ISBN:9781337102100
Author:Joyce, Farrell.
Publisher:Cengage Learning,
Programming Logic & Design Comprehensive
Computer Science
ISBN:9781337669405
Author:FARRELL
Publisher:Cengage
C++ for Engineers and Scientists
Computer Science
ISBN:9781133187844
Author:Bronson, Gary J.
Publisher:Course Technology Ptr
Control Structures - while loop - do-while loop - for loop - Goto - break - continue statements; Author: EzEd Channel;https://www.youtube.com/watch?v=21l11_9Osd0;License: Standard YouTube License, CC-BY