Deck 11: Building Programs

Full screen (f)
exit full mode
Question
A common pattern from the early days of computers and data processing is the three-part program, expressed like this:
1) Prepare (declare and initialize variables, display headings and messages)
2) Process data (until end of input)
3) Delete data (display totals, summaries, and closing messages)
Use Space or
up arrow
down arrow
to flip the card.
Question
The purpose of a program is to:
• Performing calculations
• Calculating statistics
• Generating reports
• Processing orders
Question
Programs are built with a combination of the three control structures: sequence, selection, and arrays.
Question
Decision tables are used to show the names of modules and their relationships to each other.
Question
If you need odd or even numbers for an application, you can use a For loop that increments or decrements in steps of 2.
Question
Hierarchy charts used to give users choices of possible valid actions.
Question
A decision table is used to prevent or reduce user input errors.
Question
Menus are used to keep lists of similar variables in memory throughout the run of a program.
Question
A repeating menu is implemented in a loop.
Question
Menus usually use sentinel values to exit.
Question
A hierarchy chart is usually written in two stages: first, the table with all combinations of conditions and outcomes listed, and then the final version with irrelevant conditions eliminated.
Question
One way of testing programs is to develop data that includes as many possible variations as you can think of.
Question
   -The accompanying diagram depicts a truth table.<div style=padding-top: 35px>

-The accompanying diagram depicts a truth table.
Question
Data sets should include values before, at, and after the values named in conditions.
Question
Besides testing a module's internal contents, thorough testing checks a module's interaction with other modules by trying all kinds of argument values when a module calls other modules.
Question
Software testing should never simulate the actual conditions of real-world business.
Question
Software testing involves testing every line of code and anticipating every conceivable user action.
Question
When conducting software tests, you should always check for whether memory is being used efficiently and whether any processing steps are unnecessary.
Question
Factors measured during field testing include processing time and throughput.
Question
When conducting field tests, users testing the program are often surveyed for their opinions and suggestions about the program and its interface.
Question
As a beginning programmer, you should give your code to other programmers and ask for their reactions to the comments, not just to the code.
Question
As a beginning programmer, you should let other people run your program and ask for their comments.
Question
A software company's reputation is on the line when a product goes to market, so testing of any software product must be thorough and accurate.
Question
Inefficient use of memory and wasted processing steps might not be noticeable with a small number of records, but they can have a major effect with large numbers of records or users.
Question
As a beginning programmer, you should let other people run your program and challenge them to "break" it.
Question
In programming, the preparation tasks performed before processing data records are known as ____.

A) field testing
B) module processing
C) housekeeping
D) data validation
Question
A(n) ____ is typically a loop that processes each data record that's input by a user or contained in a data file.

A) processing module
B) object
C) function
D) stub
Question
The ____ is the closing section of a data-processing program. It includes reporting results and totals.

A) field module
B) testing module
C) processing module
D) finish-up module
Question
Based on the description below, what structure do you think is needed for the input?
The amount of rainfall for each day in April is to be entered and displayed along with each day's percentage of the month's total rainfall.

A) Loop
B) Selection
C) Case
D) Sequence
Question
____ are the simplest control structure, used when statements are to be performed in order.

A) Sequence structures
B) Repetition structures
C) Selection structures
D) Modules and functions
Question
____ are used when a choice must be made between two or more courses of action, based on evaluation of a condition.

A) Sequence structures
B) Repetition structures
C) Selection structures
D) Modules and functions
Question
____ are used when an action might need to be taken multiple times.

A) Sequence structures
B) Repetition structures
C) Selection structures
D) Modules and functions
Question
____ are used to make programs easier to manage and to provide reusable code.

A) Sequence structures
B) Repetition structures
C) Selection structures
D) Modules and functions
Question
____ is/are used in many programming languages to focus on objects rather than procedures.

A) Classes and objects
B) Pseudocode
C) Graphical user interfaces
D) Flowcharts
Question
____ is/are used to create an attractive environment for users that's easier to use than a command-line interface.

A) Classes and objects
B) Pseudocode
C) Graphical user interfaces
D) Flowcharts
Question
____ is/are used to develop the steps of an algorithm without being tied to a specific language.

A) Classes and objects
B) Pseudocode
C) Graphical user interfaces
D) Flowcharts
Question
____ focus(es) more on the logic of a problem than on syntax rules.

A) Classes and objects
B) Pseudocode
C) Graphical user interfaces
D) Flowcharts
Question
____ is/are used to represent an algorithm's steps graphically.

A) Classes and objects
B) Pseudocode
C) Graphical user interfaces
D) Flowcharts
Question
____ are used to list the inputs, processing steps, and outputs needed to solve a problem.

A) Decision tables
B) Truth tables
C) Binary trees
D) IPO charts
Question
____ are used to specify the actions to take for combinations of logical conditions.

A) Decision tables
B) Truth tables
C) Binary trees
D) IPO charts
Question
____ are used to represent in graphical form the outcomes of combining logical conditions.

A) Decision tables
B) Truth tables
C) Binary trees
D) IPO charts
Question
Based on the description below, what kind of loop do you think should be used?
Students' scores in a class are entered as percentages. The program is to display a letter grade when the percentage is input and display cumulative totals for the number of As, Bs, Cs, Ds, and Fs earned. The program should also check for invalid input.

A) For loop
B) While loop
C) Nested loop
D) Array
Question
Based on the description below, how would you determine letter grades?
Students' scores in a class are entered as percentages. The program is to display a letter grade when the percentage is input and display cumulative totals for the number of As, Bs, Cs, Ds, and Fs earned. The program should also check for invalid input.

A) Through a series of If/Else If statements
B) With an accumulator
C) Through a sentinel value
D) With an array
Question
Based on the description below, what structure do you need for the input?
In a program with statistics activities, the user should have a choice of repeatedly calculating statistics-including sum, product, maximum, minimum, and average-on sets of numbers.

A) Sequence
B) Case
C) Selection
D) Menu
Question
Based on the description below, how should the statistics activities be coded?
In a program with statistics activities, the user should have a choice of repeatedly calculating statistics-including sum, product, maximum, minimum, and average-on sets of numbers.

A) The steps can be done in the scope of an If/Else If structure.
B) The steps can be done in the scope of a truth table.
C) The steps can be done in an array.
D) The steps can be done in the scope of a binary tree.
Question
Data values created for the purpose of testing program logic are called ____.

A) data sets
B) arrays
C) field tests
D) stubs
Question
____ is concerned with methods, best practices, and tools for professional software development.

A) Field testing
B) Housekeeping
C) Software engineering
D) Module processing
Question
____ involves running a program in an environment set up to simulate real-world operating conditions.

A) Field testing
B) Housekeeping
C) Software engineering
D) Module processing
Question
____ is often done with employees who will be using the program eventually.

A) Field testing
B) Housekeeping
C) Software engineering
D) Module processing
Question
The term ____ refers to the number of records processed in a given time period.

A) throughput
B) data set
C) data validation
D) sentinel
Unlock Deck
Sign up to unlock the cards in this deck!
Unlock Deck
Unlock Deck
1/50
auto play flashcards
Play
simple tutorial
Full screen (f)
exit full mode
Deck 11: Building Programs
1
A common pattern from the early days of computers and data processing is the three-part program, expressed like this:
1) Prepare (declare and initialize variables, display headings and messages)
2) Process data (until end of input)
3) Delete data (display totals, summaries, and closing messages)
False
2
The purpose of a program is to:
• Performing calculations
• Calculating statistics
• Generating reports
• Processing orders
True
3
Programs are built with a combination of the three control structures: sequence, selection, and arrays.
False
4
Decision tables are used to show the names of modules and their relationships to each other.
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
5
If you need odd or even numbers for an application, you can use a For loop that increments or decrements in steps of 2.
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
6
Hierarchy charts used to give users choices of possible valid actions.
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
7
A decision table is used to prevent or reduce user input errors.
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
8
Menus are used to keep lists of similar variables in memory throughout the run of a program.
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
9
A repeating menu is implemented in a loop.
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
10
Menus usually use sentinel values to exit.
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
11
A hierarchy chart is usually written in two stages: first, the table with all combinations of conditions and outcomes listed, and then the final version with irrelevant conditions eliminated.
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
12
One way of testing programs is to develop data that includes as many possible variations as you can think of.
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
13
   -The accompanying diagram depicts a truth table.

-The accompanying diagram depicts a truth table.
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
14
Data sets should include values before, at, and after the values named in conditions.
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
15
Besides testing a module's internal contents, thorough testing checks a module's interaction with other modules by trying all kinds of argument values when a module calls other modules.
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
16
Software testing should never simulate the actual conditions of real-world business.
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
17
Software testing involves testing every line of code and anticipating every conceivable user action.
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
18
When conducting software tests, you should always check for whether memory is being used efficiently and whether any processing steps are unnecessary.
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
19
Factors measured during field testing include processing time and throughput.
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
20
When conducting field tests, users testing the program are often surveyed for their opinions and suggestions about the program and its interface.
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
21
As a beginning programmer, you should give your code to other programmers and ask for their reactions to the comments, not just to the code.
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
22
As a beginning programmer, you should let other people run your program and ask for their comments.
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
23
A software company's reputation is on the line when a product goes to market, so testing of any software product must be thorough and accurate.
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
24
Inefficient use of memory and wasted processing steps might not be noticeable with a small number of records, but they can have a major effect with large numbers of records or users.
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
25
As a beginning programmer, you should let other people run your program and challenge them to "break" it.
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
26
In programming, the preparation tasks performed before processing data records are known as ____.

A) field testing
B) module processing
C) housekeeping
D) data validation
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
27
A(n) ____ is typically a loop that processes each data record that's input by a user or contained in a data file.

A) processing module
B) object
C) function
D) stub
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
28
The ____ is the closing section of a data-processing program. It includes reporting results and totals.

A) field module
B) testing module
C) processing module
D) finish-up module
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
29
Based on the description below, what structure do you think is needed for the input?
The amount of rainfall for each day in April is to be entered and displayed along with each day's percentage of the month's total rainfall.

A) Loop
B) Selection
C) Case
D) Sequence
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
30
____ are the simplest control structure, used when statements are to be performed in order.

A) Sequence structures
B) Repetition structures
C) Selection structures
D) Modules and functions
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
31
____ are used when a choice must be made between two or more courses of action, based on evaluation of a condition.

A) Sequence structures
B) Repetition structures
C) Selection structures
D) Modules and functions
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
32
____ are used when an action might need to be taken multiple times.

A) Sequence structures
B) Repetition structures
C) Selection structures
D) Modules and functions
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
33
____ are used to make programs easier to manage and to provide reusable code.

A) Sequence structures
B) Repetition structures
C) Selection structures
D) Modules and functions
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
34
____ is/are used in many programming languages to focus on objects rather than procedures.

A) Classes and objects
B) Pseudocode
C) Graphical user interfaces
D) Flowcharts
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
35
____ is/are used to create an attractive environment for users that's easier to use than a command-line interface.

A) Classes and objects
B) Pseudocode
C) Graphical user interfaces
D) Flowcharts
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
36
____ is/are used to develop the steps of an algorithm without being tied to a specific language.

A) Classes and objects
B) Pseudocode
C) Graphical user interfaces
D) Flowcharts
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
37
____ focus(es) more on the logic of a problem than on syntax rules.

A) Classes and objects
B) Pseudocode
C) Graphical user interfaces
D) Flowcharts
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
38
____ is/are used to represent an algorithm's steps graphically.

A) Classes and objects
B) Pseudocode
C) Graphical user interfaces
D) Flowcharts
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
39
____ are used to list the inputs, processing steps, and outputs needed to solve a problem.

A) Decision tables
B) Truth tables
C) Binary trees
D) IPO charts
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
40
____ are used to specify the actions to take for combinations of logical conditions.

A) Decision tables
B) Truth tables
C) Binary trees
D) IPO charts
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
41
____ are used to represent in graphical form the outcomes of combining logical conditions.

A) Decision tables
B) Truth tables
C) Binary trees
D) IPO charts
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
42
Based on the description below, what kind of loop do you think should be used?
Students' scores in a class are entered as percentages. The program is to display a letter grade when the percentage is input and display cumulative totals for the number of As, Bs, Cs, Ds, and Fs earned. The program should also check for invalid input.

A) For loop
B) While loop
C) Nested loop
D) Array
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
43
Based on the description below, how would you determine letter grades?
Students' scores in a class are entered as percentages. The program is to display a letter grade when the percentage is input and display cumulative totals for the number of As, Bs, Cs, Ds, and Fs earned. The program should also check for invalid input.

A) Through a series of If/Else If statements
B) With an accumulator
C) Through a sentinel value
D) With an array
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
44
Based on the description below, what structure do you need for the input?
In a program with statistics activities, the user should have a choice of repeatedly calculating statistics-including sum, product, maximum, minimum, and average-on sets of numbers.

A) Sequence
B) Case
C) Selection
D) Menu
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
45
Based on the description below, how should the statistics activities be coded?
In a program with statistics activities, the user should have a choice of repeatedly calculating statistics-including sum, product, maximum, minimum, and average-on sets of numbers.

A) The steps can be done in the scope of an If/Else If structure.
B) The steps can be done in the scope of a truth table.
C) The steps can be done in an array.
D) The steps can be done in the scope of a binary tree.
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
46
Data values created for the purpose of testing program logic are called ____.

A) data sets
B) arrays
C) field tests
D) stubs
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
47
____ is concerned with methods, best practices, and tools for professional software development.

A) Field testing
B) Housekeeping
C) Software engineering
D) Module processing
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
48
____ involves running a program in an environment set up to simulate real-world operating conditions.

A) Field testing
B) Housekeeping
C) Software engineering
D) Module processing
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
49
____ is often done with employees who will be using the program eventually.

A) Field testing
B) Housekeeping
C) Software engineering
D) Module processing
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
50
The term ____ refers to the number of records processed in a given time period.

A) throughput
B) data set
C) data validation
D) sentinel
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
locked card icon
Unlock Deck
Unlock for access to all 50 flashcards in this deck.