University of Phoenix's Virtual Instructor's Manual
Computer Programming Concepts and Visual Basic
Chapter 1 Problem Solving
In most cases, a well-written program need not be tested. (T/F)
The analysis and design steps of program planning are largely independent of the particular computer language the programmer is using. (T/F)
What does the parallelogram flowchart symbol represent?
A flowchart is an arrangement of geometric shapes connected by arrows. (T/F)
An algorithm is defined as:
(A) a mathematical formula that solves a problem.
(B) a tempo for classical music played in a coda.
(C) a logical sequence of steps that solve a problem.
(D) a tool that designs computer programs and draws the user interface.
(A) data that have been encoded for security.
(B) the incorrect results of a computer program.
(C) a program that doesn't work.
(D) the obscure language computer personnel use when speaking.
(E) a description of an algorithm similar to a computer language.
A top-down chart is the same thing as a flowchart. (T/F)
When starting a new program, it is best to start writing code as soon as possible to avoid wasting time thinking about it. (T/F)
Pseudocode and flowcharts are two different tools or methods used in planning a solution to a problem. (T/F)
Often a problem is too difficult to understand until one writes the program. (T/F)
Which one of the following is NOT one of the four basic types of statement structures?
Which of the following is the proper order of procedures used in the problem-solving process?
(A) Design, analysis, coding, testing
(B) Analysis, testing, design, coding
(C) Analysis, design, coding, testing
(D) Analysis, design, testing, coding
(E) Design, testing, analysis, coding
Although the documentation step is usually listed last in the problem-solving process, it should actually begin when the problem is first defined and continue through the problem-solving process. (T/F)
Suppose your supervisor at work wants you to write a program to accomplish a task that he has specified. However, he has not let you know which computer language to use. It is still possible to design the program in pseudocode. (T/F)
A programmer must play detective and track down all errors since their are currently no tools available to help with this process. (T/F)
Which of the following types of charts shows only the relationships between general program tasks without showing specific modules or directions for data flow?
(A) Top-down chart
(C) Both A and B
(D) Neither A nor B
Although a flowchart (as its name suggests) depicts data flow very well, it is not easily modified once written. (T/F)
Suppose in the very early stages of the problem-solving process, your supervisor wants you to show her the relationships between the various processes that will be needed to solve the problem. The best way to do this would be to use
(A) a top-down chart.
(B) a flowchart.
(C) a sample program.
If a problem is very complex, extensive design prior to coding will actually delay the completion of the project. (T/F)
The divide-and-conquer-method of problem solving breaks a problem into large, general pieces first, then refines each piece until the problem is manageable. (T/F)
If you are writing a program that needs to repeat a series of calculations, what programming structure should you use to repeat the calculations?
(A) Sequence structure
(B) Decision structure
(C) Looping structure
(D) Unconditional branching
The purpose of a test or decision in a looping structure is to tell when the loop should end. (T/F)
"Desk-checking" refers to
(A) the continual problem programmers have with losing things.
(B) timing a program to see how fast it completes its tasks.
(C) testing an algorithm at the flowchart stage using several different kinds of data.
(D) having a fellow programmer read your pseudocode to be sure it is understandable.
Flowcharts, pseudocode, and top-down charts can be used to solve problems only in Visual Basic. (T/F)
Order the steps in the program development cycle starting with 1 for the first step and so on.
Program design (devise an algorithm).
Test the program until it is error free.
Test the design.
Problem analysis (define the problem).
Determine the input and output.
Review the code.
Add new features.
Code the program.
Enter the program.
Ans:3 8 4 1 2 7 9 5 6
What are the four basic methods of control used in designing structured algorithms?
Ans: sequence, decision, loop, unstructured branch
Ans: A logical sequence of precise steps that solve a problem.
What does the rectangle flowchart symbol represent?
What does the diamond flowchart symbol represent?
What does the circle flowchart symbol represent?
What does the "rectangle with rounded sides" flowchart symbol represent?
(B) Predefined process
The process of finding and correcting errors in a program is called
(D) development cycles.
A graphical depiction of the logical steps to carry out a task and show how the steps relate to each other is called a(n)
(D) hierarchy chart.
35. Define pseudocode
Ans: English-like phrases used as a problem-solving tool to outline the task.
36. Define flowchart
Ans: A problem-solving tool that graphically depicts the logical steps to carry out a task and show how the steps relate to each other.
37. Explain the divide-and-conquer method.
Ans: Using hierarchy charts in the initial planning of a program. Breaking down the major parts of a program so we can see what must be done in general. Then refining each module into more detailed plans using flowcharts or pseudocode.
38. What is a module?
ans: A part of a program.
39. What is a sequence structure?
Ans: One line executed right after another without skipping over any lines.
40. Define desk checking.
Ans: Testing an algorithm at the flowchart stage before being coded into a program. Different data should be used as input, and the output checked.
41. What is a decision structure?
Ans: When a decision is used to determine whether a series of instructions should be executed.
42. Flowcharts, pseudocode, and hierarchy charts are _____________________.
Ans. problem-solving tools
43. Every diamond symbol on a flow chart should have _________ flow lines coming out of it.
44. True/False It is not necessary to label flow lines on a flow chart that exit from a decision symbol.
45. True/False Flow lines on a flow chart do not have directional arrows.
46. True/False There are many styles of pseudocode.
47. A Goto statement is an example of the _________________ structure.
Ans. Unconditional branch
48. The design tool that looks similar to an organizational chart is called a ________________.
Ans. hierarchy chart
49. A hierarchy chart shows each ____________ of a program.
c. unconditional branch
50. The main benefit of a hierarchy chart is in the initial planning of a program in which the main problem is broken down into smaller programs. This is called the ___________________ approach.
51. Symbols on a flowchart are connected using _____________.
b. on-page connectors
c. branching statements
d. terminal symbols
52. Many programmers plan their programs using a sequence of steps, referred to as the __________________.
Ans. program development cycle.
53. Explain the importance of documentation in a program.
Ans. Documentation is intended to allow another person, or the programmer at a later date, to understand the program.
54. When tracing a flowchart, begin at the _____________ symbol and proceed from symbol to symbol until reaching the _______ symbol.
55. True/False Desk checking means running the program after you code it.
56. Which of the following is NOT a universal problem-solving tool?
b. hierarchy chart
c. Task-Duty chart
57. Which of the following is NOT a logical programming construct?
58. ______________________ appears in some languages as Goto statements and involves jumping from one place in a program to another.
Ans: unconditional branch
59. Structured programming forbids which of the following logical programming constructs?
c. unconditional branch
60. ______________ are a problem-solving tool that is time-consuming to write and difficult to update.
61. True/False Flowcharts clearly illustrate the logical flow of programming techniques and are a valuable tool in the education of programmers.
62. Many professional programmers prefer to use pseudocode and hierarchy charts as problem solving tools because ______________ are difficult to update and time-consuming to write.
63. True/False There are many styles of pseudocode.
64. Many people draw ____________ around each item in a hierarchy chart.
65. The first step in writing instructions to carry out a task is to determine the ____________.
66. The last step in writing instructions to carry out a task is to determine the ___________.
67. True/False Just as one should not try to build a building without a blueprint, a programmer should not try to write a program without a plan.
68. True/False Visual Basic has a "smart editor" that will point out all errors in the program before it is executed.
69. True/False Flowcharts "flow" from left to right across a page.
70. True/False No standards exist for the amount of detail required within each flowchart symbol.
71. The symbol used to represent the beginning of a flow chart is called:
72. Arithmetic and data-manipulation operations are represented in the __________ flowchart symbol.
73. Logic or comparison operations are contained in which of the following flowchart symbols?
74. True/False The flow lines in a good flowchart should not have arrows on them. It should be inherently obvious which way to go.
75. Hierarchy plus Input-Process-Output charts are called:
b. Hierarchy Plus