Deck 7: Problem Solving and Algorithms

Full screen (f)
exit full mode
Question
What is the first step in the "How to Solve It" list?

A) Establish the players
B) Understand the problem
C) Refine the problem
D) Gather resources
E) Set a timeline
Use Space or
up arrow
down arrow
to flip the card.
Question
What is the practice of hiding the details of a module with the goal of controlling access to the details of the module?

A) Information hiding
B) Abstraction
C) Data abstraction
D) Procedural abstraction
E) Control abstraction
Question
Which of the following is the ability for a subprogram to call itself?

A) Argument
B) Parameter
C) Recursion
D) Nested logic
E) Information hiding
Question
Which of the following eliminates a large portion of the data with each comparison?

A) Selection sort
B) Quicksort
C) Bubble sort
D) Binary search
E) Sequential search
Question
An array is a named collection of homogeneous items in which individual items are accessed by name.
Question
An array is a named collection of homogeneous items in which individual items are accessed by position.
Question
The approach to problem solving developed by George Polya is valuable, but does not apply to computer-based solutions.
Question
In top-down design, the main module is the most abstract.
Question
When a named code finishes executing as part of a statement in a program and processing resumes with the statement just below where the name occurred, the place where the name of the code appears is known as the receiving unit.
Question
After a program is in use, changes made to it to enhance functionality or fix errors is called _______________.
Question
During top-down design, a(n) _______________ step is one that is sufficiently detailed and needs no further expansion.
Question
A(n) _______________ is an instruction that determines the order in which other instructions in a program are executed.
Question
A(n) _______________ is the mechanism by which a value is passed into a subprogram.
Question
_______________ is the ability of a subprogram to call itself.
Question
In terms of problem solving, what are three questions that you might ask if you task is to send flowers to your mother?
Question
Are the following directions for shampooing hair a good example of an algorithm? Explain.
Rinse hair
Put shampoo on hair
Lather
Repeat
Question
What is a homogeneous structure?
Question
Name the four steps in Polya's "How to Solve It" list.
Question
Who wrote the book How to Solve It, which outlines a general approach to problem solving?

A) Ada Lovelace
B) Steve Jobs
C) John Vincent Atanasoff
D) George Polya
E) George Boole
Question
Which of the following includes selection statements and repetition statements?

A) Control structures
B) Operand specifier
C) Data type
D) Boolean expression
E) Information hiding
Question
Which of the following refers to the separation of the logical view of data from its implementation?

A) Procedural abstraction
B) Control abstraction
C) Data abstraction
D) Control structure
E) Abstract step
Question
Which of the following allows a WHILE loop to be contained within the body of another WHILE loop?

A) Subprogram
B) Clear-box testing
C) Recursion
D) Nested logic
E) Identifiers
Question
Which of the following uses a "divide and conquer" approach?

A) Selection sort
B) Insertion sort
C) Bubble sort
D) Binary search
E) Sequential search
Question
A record is a named heterogeneous collection of items in which individual items are accessed by position.
Question
Letters within quotations are called strings.
Question
An array is a named homogeneous collection of items in which individual items are accessed by an index.
Question
The general case of a recursive solution determines when the recursion stops.
Question
Infinite recursion occurs because there is no general case.
Question
An IF statement is an example of a control structure.
Question
An algorithm is only useful if it uses a finite amount of time and data.
Question
An algorithm is a calculation that determines how long it will take to solve a problem.
Question
An abstract step is one for which some details remain unspecified.
Question
During top-down design, a concrete step is one that needs to be expanded further.
Question
Which of the following best describes top-down design?

A) Gathering small solutions to related subproblems into a complete solution
B) Refining a particular solution into one that is more abstract
C) Decomposing a general solution into more concrete solutions to subproblems
D) Converting modules into subproblems
E) Converting classes into objects
Question
Which of the following requires the use of a "splitting value"?

A) Selection sort
B) Quicksort
C) Bubble sort
D) Binary search
E) Sequential search
Question
Which of the following allows information to be passed into a subprogram?

A) Record
B) Argument
C) Recursion
D) Nested logic
E) Black-box testing
Question
Quicksort is an effective algorithmic sorting approach to use if the data to be sorted is already in random order.
Question
Recursion is the ability of a subprogram to call itself.
Question
A record is a named heterogeneous collection of items in which individual items are accessed by name.
Question
A plan for solving a problem is not an algorithm if it requires infinite time or data.
Question
A concrete step is one that does not need to be expanded further.
Question
Algorithms cannot be tested until they are realized in a computer-based programming language.
Question
A(n) _______________ is a set of instructions for solving a problem in a finite amount of time using a finite amount of data.
Question
_______________ is the separation of the logical view of an action from its implementation.
Question
A(n) _________________ search looks for an item sorted list by eliminating large portions of the data on each comparison.
Question
The two basic forms of subprograms that exist are void subprograms, named code that that does a particular task, and ____________________ subprograms, named code that also does a task but returns a single value to the calling unit.
Question
The first pass of the _______________ sort algorithm scans the list for the item that should be first in the list, then puts it there.
Question
A(n) _______________ search examines each item in turn to find the item being sought.
Unlock Deck
Sign up to unlock the cards in this deck!
Unlock Deck
Unlock Deck
1/48
auto play flashcards
Play
simple tutorial
Full screen (f)
exit full mode
Deck 7: Problem Solving and Algorithms
1
What is the first step in the "How to Solve It" list?

A) Establish the players
B) Understand the problem
C) Refine the problem
D) Gather resources
E) Set a timeline
B
2
What is the practice of hiding the details of a module with the goal of controlling access to the details of the module?

A) Information hiding
B) Abstraction
C) Data abstraction
D) Procedural abstraction
E) Control abstraction
A
3
Which of the following is the ability for a subprogram to call itself?

A) Argument
B) Parameter
C) Recursion
D) Nested logic
E) Information hiding
C
4
Which of the following eliminates a large portion of the data with each comparison?

A) Selection sort
B) Quicksort
C) Bubble sort
D) Binary search
E) Sequential search
Unlock Deck
Unlock for access to all 48 flashcards in this deck.
Unlock Deck
k this deck
5
An array is a named collection of homogeneous items in which individual items are accessed by name.
Unlock Deck
Unlock for access to all 48 flashcards in this deck.
Unlock Deck
k this deck
6
An array is a named collection of homogeneous items in which individual items are accessed by position.
Unlock Deck
Unlock for access to all 48 flashcards in this deck.
Unlock Deck
k this deck
7
The approach to problem solving developed by George Polya is valuable, but does not apply to computer-based solutions.
Unlock Deck
Unlock for access to all 48 flashcards in this deck.
Unlock Deck
k this deck
8
In top-down design, the main module is the most abstract.
Unlock Deck
Unlock for access to all 48 flashcards in this deck.
Unlock Deck
k this deck
9
When a named code finishes executing as part of a statement in a program and processing resumes with the statement just below where the name occurred, the place where the name of the code appears is known as the receiving unit.
Unlock Deck
Unlock for access to all 48 flashcards in this deck.
Unlock Deck
k this deck
10
After a program is in use, changes made to it to enhance functionality or fix errors is called _______________.
Unlock Deck
Unlock for access to all 48 flashcards in this deck.
Unlock Deck
k this deck
11
During top-down design, a(n) _______________ step is one that is sufficiently detailed and needs no further expansion.
Unlock Deck
Unlock for access to all 48 flashcards in this deck.
Unlock Deck
k this deck
12
A(n) _______________ is an instruction that determines the order in which other instructions in a program are executed.
Unlock Deck
Unlock for access to all 48 flashcards in this deck.
Unlock Deck
k this deck
13
A(n) _______________ is the mechanism by which a value is passed into a subprogram.
Unlock Deck
Unlock for access to all 48 flashcards in this deck.
Unlock Deck
k this deck
14
_______________ is the ability of a subprogram to call itself.
Unlock Deck
Unlock for access to all 48 flashcards in this deck.
Unlock Deck
k this deck
15
In terms of problem solving, what are three questions that you might ask if you task is to send flowers to your mother?
Unlock Deck
Unlock for access to all 48 flashcards in this deck.
Unlock Deck
k this deck
16
Are the following directions for shampooing hair a good example of an algorithm? Explain.
Rinse hair
Put shampoo on hair
Lather
Repeat
Unlock Deck
Unlock for access to all 48 flashcards in this deck.
Unlock Deck
k this deck
17
What is a homogeneous structure?
Unlock Deck
Unlock for access to all 48 flashcards in this deck.
Unlock Deck
k this deck
18
Name the four steps in Polya's "How to Solve It" list.
Unlock Deck
Unlock for access to all 48 flashcards in this deck.
Unlock Deck
k this deck
19
Who wrote the book How to Solve It, which outlines a general approach to problem solving?

A) Ada Lovelace
B) Steve Jobs
C) John Vincent Atanasoff
D) George Polya
E) George Boole
Unlock Deck
Unlock for access to all 48 flashcards in this deck.
Unlock Deck
k this deck
20
Which of the following includes selection statements and repetition statements?

A) Control structures
B) Operand specifier
C) Data type
D) Boolean expression
E) Information hiding
Unlock Deck
Unlock for access to all 48 flashcards in this deck.
Unlock Deck
k this deck
21
Which of the following refers to the separation of the logical view of data from its implementation?

A) Procedural abstraction
B) Control abstraction
C) Data abstraction
D) Control structure
E) Abstract step
Unlock Deck
Unlock for access to all 48 flashcards in this deck.
Unlock Deck
k this deck
22
Which of the following allows a WHILE loop to be contained within the body of another WHILE loop?

A) Subprogram
B) Clear-box testing
C) Recursion
D) Nested logic
E) Identifiers
Unlock Deck
Unlock for access to all 48 flashcards in this deck.
Unlock Deck
k this deck
23
Which of the following uses a "divide and conquer" approach?

A) Selection sort
B) Insertion sort
C) Bubble sort
D) Binary search
E) Sequential search
Unlock Deck
Unlock for access to all 48 flashcards in this deck.
Unlock Deck
k this deck
24
A record is a named heterogeneous collection of items in which individual items are accessed by position.
Unlock Deck
Unlock for access to all 48 flashcards in this deck.
Unlock Deck
k this deck
25
Letters within quotations are called strings.
Unlock Deck
Unlock for access to all 48 flashcards in this deck.
Unlock Deck
k this deck
26
An array is a named homogeneous collection of items in which individual items are accessed by an index.
Unlock Deck
Unlock for access to all 48 flashcards in this deck.
Unlock Deck
k this deck
27
The general case of a recursive solution determines when the recursion stops.
Unlock Deck
Unlock for access to all 48 flashcards in this deck.
Unlock Deck
k this deck
28
Infinite recursion occurs because there is no general case.
Unlock Deck
Unlock for access to all 48 flashcards in this deck.
Unlock Deck
k this deck
29
An IF statement is an example of a control structure.
Unlock Deck
Unlock for access to all 48 flashcards in this deck.
Unlock Deck
k this deck
30
An algorithm is only useful if it uses a finite amount of time and data.
Unlock Deck
Unlock for access to all 48 flashcards in this deck.
Unlock Deck
k this deck
31
An algorithm is a calculation that determines how long it will take to solve a problem.
Unlock Deck
Unlock for access to all 48 flashcards in this deck.
Unlock Deck
k this deck
32
An abstract step is one for which some details remain unspecified.
Unlock Deck
Unlock for access to all 48 flashcards in this deck.
Unlock Deck
k this deck
33
During top-down design, a concrete step is one that needs to be expanded further.
Unlock Deck
Unlock for access to all 48 flashcards in this deck.
Unlock Deck
k this deck
34
Which of the following best describes top-down design?

A) Gathering small solutions to related subproblems into a complete solution
B) Refining a particular solution into one that is more abstract
C) Decomposing a general solution into more concrete solutions to subproblems
D) Converting modules into subproblems
E) Converting classes into objects
Unlock Deck
Unlock for access to all 48 flashcards in this deck.
Unlock Deck
k this deck
35
Which of the following requires the use of a "splitting value"?

A) Selection sort
B) Quicksort
C) Bubble sort
D) Binary search
E) Sequential search
Unlock Deck
Unlock for access to all 48 flashcards in this deck.
Unlock Deck
k this deck
36
Which of the following allows information to be passed into a subprogram?

A) Record
B) Argument
C) Recursion
D) Nested logic
E) Black-box testing
Unlock Deck
Unlock for access to all 48 flashcards in this deck.
Unlock Deck
k this deck
37
Quicksort is an effective algorithmic sorting approach to use if the data to be sorted is already in random order.
Unlock Deck
Unlock for access to all 48 flashcards in this deck.
Unlock Deck
k this deck
38
Recursion is the ability of a subprogram to call itself.
Unlock Deck
Unlock for access to all 48 flashcards in this deck.
Unlock Deck
k this deck
39
A record is a named heterogeneous collection of items in which individual items are accessed by name.
Unlock Deck
Unlock for access to all 48 flashcards in this deck.
Unlock Deck
k this deck
40
A plan for solving a problem is not an algorithm if it requires infinite time or data.
Unlock Deck
Unlock for access to all 48 flashcards in this deck.
Unlock Deck
k this deck
41
A concrete step is one that does not need to be expanded further.
Unlock Deck
Unlock for access to all 48 flashcards in this deck.
Unlock Deck
k this deck
42
Algorithms cannot be tested until they are realized in a computer-based programming language.
Unlock Deck
Unlock for access to all 48 flashcards in this deck.
Unlock Deck
k this deck
43
A(n) _______________ is a set of instructions for solving a problem in a finite amount of time using a finite amount of data.
Unlock Deck
Unlock for access to all 48 flashcards in this deck.
Unlock Deck
k this deck
44
_______________ is the separation of the logical view of an action from its implementation.
Unlock Deck
Unlock for access to all 48 flashcards in this deck.
Unlock Deck
k this deck
45
A(n) _________________ search looks for an item sorted list by eliminating large portions of the data on each comparison.
Unlock Deck
Unlock for access to all 48 flashcards in this deck.
Unlock Deck
k this deck
46
The two basic forms of subprograms that exist are void subprograms, named code that that does a particular task, and ____________________ subprograms, named code that also does a task but returns a single value to the calling unit.
Unlock Deck
Unlock for access to all 48 flashcards in this deck.
Unlock Deck
k this deck
47
The first pass of the _______________ sort algorithm scans the list for the item that should be first in the list, then puts it there.
Unlock Deck
Unlock for access to all 48 flashcards in this deck.
Unlock Deck
k this deck
48
A(n) _______________ search examines each item in turn to find the item being sought.
Unlock Deck
Unlock for access to all 48 flashcards in this deck.
Unlock Deck
k this deck
locked card icon
Unlock Deck
Unlock for access to all 48 flashcards in this deck.