100% found this document useful (1 vote)
3 views

Starting Out with Programming Logic and Design 3rd Edition Tony Gaddis Test Bank download

The document is a test bank for the 3rd Edition of 'Starting Out with Programming Logic and Design' by Tony Gaddis, containing multiple choice, true/false, and fill-in-the-blank questions related to programming concepts. It includes links to additional resources such as solutions manuals and test banks for other editions and related textbooks. The content focuses on input validation, error handling, and programming logic.

Uploaded by

udyryssamyn
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
100% found this document useful (1 vote)
3 views

Starting Out with Programming Logic and Design 3rd Edition Tony Gaddis Test Bank download

The document is a test bank for the 3rd Edition of 'Starting Out with Programming Logic and Design' by Tony Gaddis, containing multiple choice, true/false, and fill-in-the-blank questions related to programming concepts. It includes links to additional resources such as solutions manuals and test banks for other editions and related textbooks. The content focuses on input validation, error handling, and programming logic.

Uploaded by

udyryssamyn
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 18

Starting Out with Programming Logic and Design

3rd Edition Tony Gaddis Test Bank download

https://testbankdeal.com/product/starting-out-with-programming-
logic-and-design-3rd-edition-tony-gaddis-test-bank/

Find test banks or solution manuals at testbankdeal.com today!


Here are some recommended products for you. Click the link to
download, or explore more at testbankdeal.com

Starting Out with Programming Logic and Design 3rd Edition


Tony Gaddis Solutions Manual

https://testbankdeal.com/product/starting-out-with-programming-logic-
and-design-3rd-edition-tony-gaddis-solutions-manual/

Starting Out with Programming Logic and Design 4th Edition


Tony Gaddis Test Bank

https://testbankdeal.com/product/starting-out-with-programming-logic-
and-design-4th-edition-tony-gaddis-test-bank/

Starting Out With Programming Logic And Design 4th Edition


Tony Gaddis Solutions Manual

https://testbankdeal.com/product/starting-out-with-programming-logic-
and-design-4th-edition-tony-gaddis-solutions-manual/

Multicultural Law Enforcement 6th Edition Shusta Test Bank

https://testbankdeal.com/product/multicultural-law-enforcement-6th-
edition-shusta-test-bank/
Byrd And Chens Canadian Tax Principles 2011 2012 Edition
Canadian 1st Edition Byrd Test Bank

https://testbankdeal.com/product/byrd-and-chens-canadian-tax-
principles-2011-2012-edition-canadian-1st-edition-byrd-test-bank/

Marketing Research Asia-Pacific 4th Edition Zikmund


Solutions Manual

https://testbankdeal.com/product/marketing-research-asia-pacific-4th-
edition-zikmund-solutions-manual/

Real Estate Finance and Investments 15th Edition


Brueggeman Test Bank

https://testbankdeal.com/product/real-estate-finance-and-
investments-15th-edition-brueggeman-test-bank/

Absolute C++ 5th Edition Savitch Solutions Manual

https://testbankdeal.com/product/absolute-c-5th-edition-savitch-
solutions-manual/

International Politics Power and Purpose in Global Affairs


3rd Edition Paul DAnieri Solutions Manual

https://testbankdeal.com/product/international-politics-power-and-
purpose-in-global-affairs-3rd-edition-paul-danieri-solutions-manual/
Personal Finance 13th Edition Garman Test Bank

https://testbankdeal.com/product/personal-finance-13th-edition-garman-
test-bank/
Gaddis: Starting Out with Programming Logic & Design Test Bank

Chapter Seven

MULTIPLE CHOICE
1. What is the famous saying among computer programmers that refers to the fact that computers
cannot tell the difference between good and bad data?
a. Garbage input, garbage output
b. Garbage in, garbage out
c. Garbage output is from garbage inputted
d. Garbage out is from garbage in
e. None of the above

ANS: B

2. The purpose of the __________ is to get the first input value for the validation of a loop.
a. GIGO
b. Read
c. Priming read
d. Write
e. None of the above

ANS: C

3. Designing a program to avoid common errors is called _________________ programming.


a. Defensive
b. Direct
c. Defective
d. Detective
e. None of the above

ANS: A

4. _______________ happens when an input operation attempts to read data, but there is no data
to read.
a. No data
b. Error reading
c. Input error
d. Empty input
e. None of the above

ANS: D

5. Input ______________ is commonly done with a loop that iterates as long as an input variable
contains bad data.
a. Check
b. Validation
c. Examination
d. Priming
e. None of the above

©2013 Pearson Education, Inc. Upper Saddle River, NJ. All Rights Reserved.
Gaddis: Starting Out with Programming Logic & Design Test Bank Chapter Seven 2

ANS: B

6. _______________ is sometimes the term used for input validation.


a. Input error
b. Error trap
c. Input trap
d. Data error
e. None of the above

ANS: B

7. In addition to using loops to validate data, _____________ can also be used to validate data.
a. String Function
b. Real Function
c. Integer Function
d. Boolean Function
e. None of the above

ANS: D

8. Which of the following is not a check for data accuracy?


a. Salary within the allowable range
b. Time measurements
c. ZIP codes in correct format and valid
d. All of the above are checks for data accuracy
e. None of the above

ANS: D

9. Which of the following is not an input validation error type?


a. Empty input
b. Incorrect data type
c. Inaccurate data
d. All of the above are input validation error types
e. None of the above

ANS: D

10. What is the first step to use in detecting data type mismatch errors?
a. Read the input as a string
b. Convert to the desired data type
c. Determine whether it can be converted
d. Display error message
e. None of the above

ANS: A

11. The priming read is placed _________ the loop.


a. Inside
b. Before

©2013 Pearson Education, Inc. Upper Saddle River, NJ. All Rights Reserved.
Gaddis: Starting Out with Programming Logic & Design Test Bank Chapter Seven 3

c. Below
d. Inside and before
e. Inside and below

ANS: B

12. Which of the following statements is true about this Boolean expression?
score < 0 AND score > 100
a. This expression is true for numbers between 0 and 100.
b. This expression is true for numbers greater than 100.
c. This expression is true for numbers less than 0.
d. This expression would never be true.
e. None of the above

ANS: D

13. What type of function can be used to see if the password entered has the minimum number of
characters?
a. Mathematical
b. Boolean
c. String
d. Trigonometric
e. None of the above

ANS: C

14. If, when asked for a date of birth, the user enters a future date, this error should be caught by a
____________ check.
a. Date
b. Time
c. Day
d. Reasonableness
e. None of the above

ANS: D

15. Accepting February 29 in only a leap year is a check that is done by a ___________ check.
a. Date
b. Day
c. Month
d. Calendar
e. None of the above

ANS: A

16. Which of the following library functions could be used to validate the length of a string?
a. random
b. isString

©2013 Pearson Education, Inc. Upper Saddle River, NJ. All Rights Reserved.
Gaddis: Starting Out with Programming Logic & Design Test Bank Chapter Seven 4

c. length
d. toUpper
e. None of the above

ANS: C

17. Which of the following library functions could be used to validate that the correct data type was
input for an amount of money?
a. isInteger
b. isString
c. toLower
d. isReal
e. All of the above

ANS: D

18. Which of the following library functions could be used to simplify the process of string
validation?
a. length
b. toUpper
c. isReal
d. isInteger
e. None of the above

ANS: B

TRUE/FALSE
1. True/False: An input validation loop is sometimes called an error handler.

ANS: T

2. True/False: If the user provides bad data as input to a program, the program will correct the
data and produce output.

ANS: F

3. True/False: Programs should be designed such that all input is inspected before it is processed
and bad data is discarded.

ANS: T

4. True/False: The priming read is needed when a pretest loop is executed.

ANS: T

5. True/False: Often a Boolean function can be used to validate data.

©2013 Pearson Education, Inc. Upper Saddle River, NJ. All Rights Reserved.
Gaddis: Starting Out with Programming Logic & Design Test Bank Chapter Seven 5

ANS: T

6. True/False: The empty read is not an obvious input error and is a difficult one to handle.

ANS: F

7. True/False: The practice of anticipating errors that can happen while a program is running and
designing the program to avoid those errors is called defensive programming.

ANS: T

8. True/False: Checking for accuracy of data, even when the user provides the right type of data,
is part of input validation.

ANS: T

9. True/False: Checking for reasonableness of data is programmatically impossible.

ANS: F

10. True/False: When using string input validation it is wise to use the library function to convert the
input to upper case or lowercase so case-sensitive string comparisons can be made.

ANS: T

11. True/False: Input validation is not needed if the program is well designed.

ANS: F

12. True/False: Most programming languages do not provide library functions that can be used for
input validation.

ANS: F

FILL IN THE BLANK


1. An error trap can be performed by a(n) ____________________ validation loop.

ANS: input

2. __________ programming is the practice of anticipating errors that can happen while a program
is running.

ANS: Defensive

3. The acronym ___________ is used by programmers to refer to the fact that computers cannot
tell difference between good and bad data.

©2013 Pearson Education, Inc. Upper Saddle River, NJ. All Rights Reserved.
Gaddis: Starting Out with Programming Logic & Design Test Bank Chapter Seven 6

ANS: GIGO

4. The input operation that is performed just before a validation loop is known as the _________.

ANS: priming read

5. The _________________ occurs when the user presses the ENTER key without typing a value
for an input operation.

ANS: empty input

6. Using a ________________ function many times would simplify the long compound Boolean
expression that is used by a validation loop.

ANS: Boolean

7. To validate if the input data is a valid integer, use the __________ library function.

ANS: isInteger

8. An input validation that accepts strings in mixed case would have incorporated a case-
__________ string comparison operation.

ANS: insensitive

9. The string _________ function plays a role in the string’s validity when a minimum number of
characters are required to be entered.

ANS: length

10. A _________ loop could be used to validate input instead of using the priming read.

ANS: posttest

11. When a payroll program verifies that no value greater than 168 is entered for the number of
hours worked in a week, it is performing a ___________________ check.

ANS: time measurement

12. After the string is read it is determined if it can be converted to the desired data type in a
_____________ error.

ANS: type mismatch

13. When a loop rejects any input except the strings “yes” and “no” then it is performing a case-
___________ comparison.

ANS: sensitive

14. Programs that contain a priming read have a _________ loop.

©2013 Pearson Education, Inc. Upper Saddle River, NJ. All Rights Reserved.
Gaddis: Starting Out with Programming Logic & Design Test Bank Chapter Seven 7

ANS: pretest

15. The integrity of a program’s output is only as good as the integrity of the program’s ________.

ANS: input

16. When ____________ data is entered by the user, the program should at least ask the user to
confirm that he or she intended to enter it.

ANS: unreasonable

17. When the user enters a U.S. Address, the value entered as the ________ should be checked to
verify that it is both valid and in the correct format.

ANS: ZIP code

18. You should design your programs in such a way that bad ____________ is never accepted.

ANS: input

©2013 Pearson Education, Inc. Upper Saddle River, NJ. All Rights Reserved.
Random documents with unrelated
content Scribd suggests to you:
law in creating the Project Gutenberg™ collection. Despite these
efforts, Project Gutenberg™ electronic works, and the medium
on which they may be stored, may contain “Defects,” such as,
but not limited to, incomplete, inaccurate or corrupt data,
transcription errors, a copyright or other intellectual property
infringement, a defective or damaged disk or other medium, a
computer virus, or computer codes that damage or cannot be
read by your equipment.

1.F.2. LIMITED WARRANTY, DISCLAIMER OF DAMAGES - Except


for the “Right of Replacement or Refund” described in
paragraph 1.F.3, the Project Gutenberg Literary Archive
Foundation, the owner of the Project Gutenberg™ trademark,
and any other party distributing a Project Gutenberg™ electronic
work under this agreement, disclaim all liability to you for
damages, costs and expenses, including legal fees. YOU AGREE
THAT YOU HAVE NO REMEDIES FOR NEGLIGENCE, STRICT
LIABILITY, BREACH OF WARRANTY OR BREACH OF CONTRACT
EXCEPT THOSE PROVIDED IN PARAGRAPH 1.F.3. YOU AGREE
THAT THE FOUNDATION, THE TRADEMARK OWNER, AND ANY
DISTRIBUTOR UNDER THIS AGREEMENT WILL NOT BE LIABLE
TO YOU FOR ACTUAL, DIRECT, INDIRECT, CONSEQUENTIAL,
PUNITIVE OR INCIDENTAL DAMAGES EVEN IF YOU GIVE
NOTICE OF THE POSSIBILITY OF SUCH DAMAGE.

1.F.3. LIMITED RIGHT OF REPLACEMENT OR REFUND - If you


discover a defect in this electronic work within 90 days of
receiving it, you can receive a refund of the money (if any) you
paid for it by sending a written explanation to the person you
received the work from. If you received the work on a physical
medium, you must return the medium with your written
explanation. The person or entity that provided you with the
defective work may elect to provide a replacement copy in lieu
of a refund. If you received the work electronically, the person
or entity providing it to you may choose to give you a second
opportunity to receive the work electronically in lieu of a refund.
If the second copy is also defective, you may demand a refund
in writing without further opportunities to fix the problem.

1.F.4. Except for the limited right of replacement or refund set


forth in paragraph 1.F.3, this work is provided to you ‘AS-IS’,
WITH NO OTHER WARRANTIES OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO WARRANTIES OF
MERCHANTABILITY OR FITNESS FOR ANY PURPOSE.

1.F.5. Some states do not allow disclaimers of certain implied


warranties or the exclusion or limitation of certain types of
damages. If any disclaimer or limitation set forth in this
agreement violates the law of the state applicable to this
agreement, the agreement shall be interpreted to make the
maximum disclaimer or limitation permitted by the applicable
state law. The invalidity or unenforceability of any provision of
this agreement shall not void the remaining provisions.

1.F.6. INDEMNITY - You agree to indemnify and hold the


Foundation, the trademark owner, any agent or employee of the
Foundation, anyone providing copies of Project Gutenberg™
electronic works in accordance with this agreement, and any
volunteers associated with the production, promotion and
distribution of Project Gutenberg™ electronic works, harmless
from all liability, costs and expenses, including legal fees, that
arise directly or indirectly from any of the following which you
do or cause to occur: (a) distribution of this or any Project
Gutenberg™ work, (b) alteration, modification, or additions or
deletions to any Project Gutenberg™ work, and (c) any Defect
you cause.

Section 2. Information about the Mission


of Project Gutenberg™
Project Gutenberg™ is synonymous with the free distribution of
electronic works in formats readable by the widest variety of
computers including obsolete, old, middle-aged and new
computers. It exists because of the efforts of hundreds of
volunteers and donations from people in all walks of life.

Volunteers and financial support to provide volunteers with the


assistance they need are critical to reaching Project
Gutenberg™’s goals and ensuring that the Project Gutenberg™
collection will remain freely available for generations to come. In
2001, the Project Gutenberg Literary Archive Foundation was
created to provide a secure and permanent future for Project
Gutenberg™ and future generations. To learn more about the
Project Gutenberg Literary Archive Foundation and how your
efforts and donations can help, see Sections 3 and 4 and the
Foundation information page at www.gutenberg.org.

Section 3. Information about the Project


Gutenberg Literary Archive Foundation
The Project Gutenberg Literary Archive Foundation is a non-
profit 501(c)(3) educational corporation organized under the
laws of the state of Mississippi and granted tax exempt status
by the Internal Revenue Service. The Foundation’s EIN or
federal tax identification number is 64-6221541. Contributions
to the Project Gutenberg Literary Archive Foundation are tax
deductible to the full extent permitted by U.S. federal laws and
your state’s laws.

The Foundation’s business office is located at 809 North 1500


West, Salt Lake City, UT 84116, (801) 596-1887. Email contact
links and up to date contact information can be found at the
Foundation’s website and official page at
www.gutenberg.org/contact
Section 4. Information about Donations to
the Project Gutenberg Literary Archive
Foundation
Project Gutenberg™ depends upon and cannot survive without
widespread public support and donations to carry out its mission
of increasing the number of public domain and licensed works
that can be freely distributed in machine-readable form
accessible by the widest array of equipment including outdated
equipment. Many small donations ($1 to $5,000) are particularly
important to maintaining tax exempt status with the IRS.

The Foundation is committed to complying with the laws


regulating charities and charitable donations in all 50 states of
the United States. Compliance requirements are not uniform
and it takes a considerable effort, much paperwork and many
fees to meet and keep up with these requirements. We do not
solicit donations in locations where we have not received written
confirmation of compliance. To SEND DONATIONS or determine
the status of compliance for any particular state visit
www.gutenberg.org/donate.

While we cannot and do not solicit contributions from states


where we have not met the solicitation requirements, we know
of no prohibition against accepting unsolicited donations from
donors in such states who approach us with offers to donate.

International donations are gratefully accepted, but we cannot


make any statements concerning tax treatment of donations
received from outside the United States. U.S. laws alone swamp
our small staff.

Please check the Project Gutenberg web pages for current


donation methods and addresses. Donations are accepted in a
number of other ways including checks, online payments and
credit card donations. To donate, please visit:
www.gutenberg.org/donate.

Section 5. General Information About


Project Gutenberg™ electronic works
Professor Michael S. Hart was the originator of the Project
Gutenberg™ concept of a library of electronic works that could
be freely shared with anyone. For forty years, he produced and
distributed Project Gutenberg™ eBooks with only a loose
network of volunteer support.

Project Gutenberg™ eBooks are often created from several


printed editions, all of which are confirmed as not protected by
copyright in the U.S. unless a copyright notice is included. Thus,
we do not necessarily keep eBooks in compliance with any
particular paper edition.

Most people start at our website which has the main PG search
facility: www.gutenberg.org.

This website includes information about Project Gutenberg™,


including how to make donations to the Project Gutenberg
Literary Archive Foundation, how to help produce our new
eBooks, and how to subscribe to our email newsletter to hear
about new eBooks.
Welcome to our website – the perfect destination for book lovers and
knowledge seekers. We believe that every book holds a new world,
offering opportunities for learning, discovery, and personal growth.
That’s why we are dedicated to bringing you a diverse collection of
books, ranging from classic literature and specialized publications to
self-development guides and children's books.

More than just a book-buying platform, we strive to be a bridge


connecting you with timeless cultural and intellectual values. With an
elegant, user-friendly interface and a smart search system, you can
quickly find the books that best suit your interests. Additionally,
our special promotions and home delivery services help you save time
and fully enjoy the joy of reading.

Join us on a journey of knowledge exploration, passion nurturing, and


personal growth every day!

testbankdeal.com

You might also like