Just Enough Programming Logic and
Design, 2nd Edition: Chapter 1 Questions
and Answers
semantic errors/logical errors - ANSWER-these occur when the grammar is correct
but the statement makes no sense in the current context; more difficult to locate than
syntax errors
Example - ANSWER-start
input original Number
compute calculated Answer = original Number times 2
output calculated Answer
stop
memory - ANSWER-the internal storage in a computer; often called main memory or
random access memory (RAM)
volatile - ANSWER-internal memory is this; though needed to run programs, its
contents are lost every time the computer loses power; external storage provides
nonvolatile/persistent medium; even though hard disk drive is located inside
computer, it is not main, internal memory (internal memory = temporary and volatile;
hard drive = permanent, nonvolatile)
programming process/program development cycle - ANSWER-1. understand the
problem
2. planning the logic
3. coding the program
4. using software (a compiler of interpreter) to translate the program into machine
language
5. testing the program
6. putting the program into production
7. maintaining the program
algorithm - ANSWER-the sequence of steps necessary to solve any problem;
programmers refer to planning a program as "developing an algorithm"
desk-checking - ANSWER-the process for asking through a program's logic on paper
before writing the program
high-level programming language - ANSWER-English-like language in which the
programmer writes
low-level machine language - ANSWER-the language that the computer understands
conversion - ANSWER-the entire set of actions an organization must take to switch
over to using a new program or set of programs; con sometimes takes months/years
to accomplish
, maintenance - ANSWER-the process of updating programs
pseudocode - ANSWER-an English-like representation of the logical steps it takes to
solve a problem; "false code"; sentences that appear to have been written in a
computer programming language but do not necessarily follow all the syntax rules of
any specific language; planning tool, not final product
flowchart - ANSWER-a pictorial representation of what pseudocode represents; uses
geometric shapes and arrows to connect shapes; read mostly from top to bottom/left
to right
input symbol - ANSWER-symbolized with a (usually right-leaning) parallelogram;
indicates input operation
processing symbol - ANSWER-symbolized with a rectangle
output symbol - ANSWER-symbolized with a parallelogram
input/output symbol (I/O symbol) - ANSWER-the parallelogram in flowcharts
flowlines - ANSWER-arrows used to connect the steps of a flowchart and to show
the correct sequence of statements
terminal symbols - ANSWER-start/stop symbols at each end of flowchart; standard is
shaped like a racetrack/lozenge
variables - ANSWER-names after memory locations, whose contents can vary over
time; holds just one value
note: no programming language allows space within a variable name, and, generally,
variable name should not begin with a digit
identifier - ANSWER-variable name
camel casing - ANSWER-where second word begins with capital letter; (e.g. "hourly
Wage" has a "hump" in the middle)
Pascal casing - ANSWER-when the first letter of a variable name is uppercase (e.g.
"Hourly Wage")
assignment statements - ANSWER-individual instructions; most programming
languages allow shorthand expressions for these
assignment operator - ANSWER-in most modern programming languages, the equal
sign is this; requires the name of a memory location on left side (the name of the
location where result will be stored)
Design, 2nd Edition: Chapter 1 Questions
and Answers
semantic errors/logical errors - ANSWER-these occur when the grammar is correct
but the statement makes no sense in the current context; more difficult to locate than
syntax errors
Example - ANSWER-start
input original Number
compute calculated Answer = original Number times 2
output calculated Answer
stop
memory - ANSWER-the internal storage in a computer; often called main memory or
random access memory (RAM)
volatile - ANSWER-internal memory is this; though needed to run programs, its
contents are lost every time the computer loses power; external storage provides
nonvolatile/persistent medium; even though hard disk drive is located inside
computer, it is not main, internal memory (internal memory = temporary and volatile;
hard drive = permanent, nonvolatile)
programming process/program development cycle - ANSWER-1. understand the
problem
2. planning the logic
3. coding the program
4. using software (a compiler of interpreter) to translate the program into machine
language
5. testing the program
6. putting the program into production
7. maintaining the program
algorithm - ANSWER-the sequence of steps necessary to solve any problem;
programmers refer to planning a program as "developing an algorithm"
desk-checking - ANSWER-the process for asking through a program's logic on paper
before writing the program
high-level programming language - ANSWER-English-like language in which the
programmer writes
low-level machine language - ANSWER-the language that the computer understands
conversion - ANSWER-the entire set of actions an organization must take to switch
over to using a new program or set of programs; con sometimes takes months/years
to accomplish
, maintenance - ANSWER-the process of updating programs
pseudocode - ANSWER-an English-like representation of the logical steps it takes to
solve a problem; "false code"; sentences that appear to have been written in a
computer programming language but do not necessarily follow all the syntax rules of
any specific language; planning tool, not final product
flowchart - ANSWER-a pictorial representation of what pseudocode represents; uses
geometric shapes and arrows to connect shapes; read mostly from top to bottom/left
to right
input symbol - ANSWER-symbolized with a (usually right-leaning) parallelogram;
indicates input operation
processing symbol - ANSWER-symbolized with a rectangle
output symbol - ANSWER-symbolized with a parallelogram
input/output symbol (I/O symbol) - ANSWER-the parallelogram in flowcharts
flowlines - ANSWER-arrows used to connect the steps of a flowchart and to show
the correct sequence of statements
terminal symbols - ANSWER-start/stop symbols at each end of flowchart; standard is
shaped like a racetrack/lozenge
variables - ANSWER-names after memory locations, whose contents can vary over
time; holds just one value
note: no programming language allows space within a variable name, and, generally,
variable name should not begin with a digit
identifier - ANSWER-variable name
camel casing - ANSWER-where second word begins with capital letter; (e.g. "hourly
Wage" has a "hump" in the middle)
Pascal casing - ANSWER-when the first letter of a variable name is uppercase (e.g.
"Hourly Wage")
assignment statements - ANSWER-individual instructions; most programming
languages allow shorthand expressions for these
assignment operator - ANSWER-in most modern programming languages, the equal
sign is this; requires the name of a memory location on left side (the name of the
location where result will be stored)