cit 330 final – Flashcards

Unlock all answers in this set

Unlock answers
question
The problem with the following statement is that ____. 100 = grade
answer
the value on the left must be a variable name
question
A database holds a group of files, often called ____, that together serve the information needs of an organization.
answer
tables
question
____ errors are detected by a compiler.
answer
Syntax
question
When data items are stored for use on computer systems, they are often stored in what is known as a data hierarchy.
answer
True
question
The major difference between the two main programming styles in use today is the ____.
answer
focus the programmer takes during the earliest planning stages of a project
question
When designing the logic of a computer program, it is important to consider the specific syntax of a particular computer language.
answer
False
question
The ____ is the standard terminal symbol for a flowchart.
answer
lozenge
question
The process of walking through a program's logic on paper before you actually write the program is called ____.
answer
desk-checking
question
A variable name is also called a(n) ____.
answer
identifier
question
Using ____ involves writing down all the steps you will use in a program.
answer
pseudocode
question
Alan Turing is often regarded as the first programmer.
answer
False
question
The best choice for a variable name representing an interest rate is ____.
answer
i
question
Professional computer programmers write programs based on their own needs.
answer
False
question
A(n) ____ is a message that is displayed on a monitor, asking the user for a response.
answer
prompt
question
A program with a(n) ____ never ends.
answer
infinite loop
question
After a programmer plans the logic of a program, the next step is ____.
answer
coding the program
question
A floppy disk is an example of ____.
answer
external storage
question
If a flowchart has six processing steps and a page provides room for only three, you can use a ____ to create the completed flowchart.
answer
lozenge
question
In some programming languages, programmers must write a variable ____ telling the compiler what data type is expected for the variable.
answer
declaration
question
No matter which programming language a computer programmer uses, the language has rules governing its word usage and punctuation.
answer
True
question
The following pseudocode reads a number from the user, multiplies it by 2 and prints the result. The ____ program statement should replace the ? to make this program functional and structured. get inputNumber while not eof calculatedAnswer = inputNumber * 2 print calculatedAnswer ? endwhile
answer
get inputNumber
question
The maximum number of entry points that any programming structure can have is ____.
answer
one
question
One way to straighten out a flowchart segment that is not structured is to use what is called the "____" method.
answer
spaghetti bowl
question
____ is an example of a pretest loop.
answer
while
question
When you write a series of decisions using the case structure, the computer still makes a series of individual decisions.
answer
True
question
When you use a while loop, at least one performance of the action inside the loop body always occurs.
answer
False
question
Another name for a loop structure is ____.
answer
iteration
question
The following pseudocode might be rewritten using a(n) ____ structure: if class = "Freshman" then tuitionFee = 75 else if class = "Sophomore" then tuitionFee = 50 else if class = "Junior" then tuitionFee = 30 else tuitionFee = 10 endif endif endif
answer
case
question
The following pseudocode is an example of a(n) ____ structure: get firstNumber get secondNumber add firstNumber and secondNumber print result
answer
sequence
question
When you encounter an eof question in a flowchart, you know that either a selection or loop structure should begin.
answer
True
question
With a selection structure, you perform an action or task, and then you perform the next action, in order.
answer
False
question
Structured programs can be easily broken down into routines or ____ that can be assigned to any number of programmers.
answer
modules
question
____ is considered to be a convenience structure.
answer
case
question
In a case structure, the term ____ means "if none of the other cases were true."
answer
default
question
The following pseudocode is an example of a(n) ____ structure: get number while number is positive add to sum get number
answer
loop
question
Years ago, programmers could avoid using structure by inserting a "____" statement into their pseudocode.
answer
go to
question
Fill in the blank in the following pseudocode: if someCondition is true then do oneProcess ____ do theOtherProcess
answer
else
question
Suppose a program will read 100 data records, and you read the first data record in a statement that is separate from the other 99. This is called a ____ read.
answer
priming
question
In a structured program, any structure can be nested within another structure.
answer
True
question
The following pseudocode is an example of a(n) ____ structure: if firstNumber is bigger than secondNumber then print firstNumber else print secondNumber
answer
decision
question
"Information" can best be described as
answer
intelligence
question
Which of the following statements would calculate a 6% sales tax?
answer
SalesTax = Total * 0.06
question
What is the value of the following expression: 19 MOD 5?
answer
4
question
Variable names may contain only letters, digits and the underscore character. Blank spaces are not allowed in variable names.
answer
True
question
A(n) __________ is a storage location used for holding data and information
answer
variable
question
Text inside double quotes is called a __________
answer
string literal
question
Text contained inside double quotes is called a __________, and when printed it appears literally as typed.
answer
string literal
question
When an Assignment statement is executed, it (1) calculates the value of the expression on the right of the equal sign, and (2) stores the resulting value in the variable on the left of the equal sign.
answer
True
question
A(n) __________ is a value-returning code element, such as a variable or mathematical formula.
answer
expression
question
The term "bug" is often used to describe a computer error. Back in 1947 an actual bug was found to be causing problems in a computer system. The bug was a __________.
answer
moth
question
What is the value of the following expression: 23 MOD 7
answer
2
question
When entering large numbers as input (such as ten thousand), ______________
answer
the comma should not be used (i.e., user should type: 10000)
question
What is the result of the following expression: FormatCurrency(12345)
answer
$12,345.00
question
When an Output statement is executed, the ampersand (&) operator may be used to concatenate a series of string literals, variables and expressions into one large expression.
answer
True
question
If a student named John Smith was prompted to enter his name, he should type the following
answer
"John Smith"
question
A computer is as smart as __________
answer
refrigerator
question
Although it is not a requirement of any programming language, it frequently makes sense to use ____ as all or part of a variable's name if the variable that holds a status.
answer
verb
question
The number of chain calls is limited only by the amount of memory available on your computer.
answer
True
question
Newer ____ programming languages allow you to use English-like vocabulary in which one broad statement corresponds to dozens of machine instructions.
answer
high-level
question
____ is the feature of programs that assures you a module has been tested and proven to function correctly.
answer
Reliability
question
Whenever a main program calls a module, the logic transfers to the main program.
answer
False
question
People who use computer programs are called ____.
answer
end users
question
When a program or module uses another module, you can refer to the main program as the ____ program.
answer
calling
question
When you dissect any large task into modules, you gain the ability to divide the task among various people.
answer
True
question
Complete documentation of a program might include operations support documentation.
answer
True
question
You can design a printed report on a ____.
answer
printer spacing chart
question
The ____ of documentation is typically written first.
answer
output
question
User documentation might include ____.
answer
instructions on how to install the program
question
A variable that is used known to the entire program is a ____ variable.
answer
global
question
____ typically appear at the end of a report after all details lines have been printed.
answer
Total lines
question
The name that is best suited to a module that calculates overtime pay is ____.
answer
calculateOvertime()
question
If you are producing a report from stored data, you frequently will be provided with a(n) ____ that describes the data contained in a file.
answer
file description
question
In a flowchart, you draw each module separately with its own sentinel symbols. The symbol that is the equivalent of the start symbol in a program contains the ____.
answer
name of the module
question
____ documentation includes all the supporting paperwork that programmers develop before they write a program.
answer
External program
question
If a subroutine or function is useful and well-written, you may want to use it more than once within a program or in other programs. This is known as ____.
answer
reusability
question
Integers are usually stored using more bytes than numbers with decimal places.
answer
False
question
A computer's decision-making process is limited becasue each of the computer's possible actions must be specified in advance. The computer therefore only selects between predefined actions based on the result of some evaluation.
answer
True
question
For A = 5 and B = 2, what is the value of the following? (B < A) XOR (A >= 3)
answer
False
question
Which of the following determines if X is the smaller than both Y and Z? Answer
answer
(X < Y) AND (X < Z)
question
A(n) _________________ is a boolean expression that evaluates to either True or False (typically using one of six relational operators =, >, <, >=, <=, or <>.)
answer
condition
question
Assuming A = 2 and B = 6, how many of the following evaluate to TRUE? A + 10 <> B ^ 2 17 Mod B = 5 A + B * 3 = 20
answer
3
question
The condition A >= B is equivalent to which of the following
answer
B <= A
question
In Visual Logic, an IF statement ends where the True and False branches reconnect.
answer
True
question
The term __________ refers to an IF statement contained within the True or False branch of another IF statement.
answer
nested IF
question
If I want to test if A is equal to B and also that C does not equal D, then both of following conditions are appropriate: A = B AND C <> D (A = B) AND (C <> D)
answer
False: Only (A = B) AND (C <> D) is appropriate because the other does not have parenthesis around the conditions. Parenthesis should always be used for conditions with a logical operator.
question
Which of the following expressions would calculate the 1's place value for Number? (e.g., if Number is 345, then it would calculate the value 5).
answer
OnesPlace = Number Mod 10
question
For A = 3 and B = 5, how many of the following evalute to TRUE? (A = 3) AND (B = A) (A <> B) AND ((B = 3) OR (A < B)) (A > B) OR (B <= 3)
answer
1
question
Every decision you make in a computer program involves evaluating a Boolean expression.
answer
True
question
A decision table consists of four parts.
answer
True
question
Suppose a movie theater manager says, "Provide a discount to patrons who are under 13 years old and those who are over 64 years old; otherwise, charge the full price." Which statement will implement this logic correctly?
answer
if patronAge < 13 OR patronAge > 64 then price = discountPrice else price = fullPrice endif
question
The structure that is used in a binary selection is ____.
answer
if-then-else
question
When you combine AND and OR operators, the OR operators take precedence, meaning their Boolean values are evaluated first.
answer
False
question
The pseudocode that produces the same result as the following is ____. if customerAge >= 65 then discount = 0.10 else discount = 0 endif
answer
if customerAge < 65 then discount = 0 else discount = 0.10 endif
question
The logical OR operator can be compared to ____ in terms of precedence.
answer
addition
question
Assume that out of 1,000 salespeople, 900 sell more than three items in a pay period, and only 500 sell items valued at $1000 or more. How many total questions must be asked in the following pseudocode to evaluate bonuses for 1000 salespeople? if itemsSold > 3 then if valueSold >= 1000 then bonusGiven = BONUS endif endif
answer
1900
question
The decision structure that is logically equivalent to the following is ___. if customerCode not equal to 1 then discount = 0.25 else discount = 0.50 endif
answer
if customerCode = 1 then discount = 0.50 else discount = 0.25 endif
question
When you must satisfy two or more criteria to initiate an event in a program, you must make sure that the second decision is made entirely independently of the first decision.
answer
False
question
A series of nested if statements can also be called a(n) ____ statement.
answer
cascading if
question
When creating a decision table, you must determine how many possible Boolean value combinations exist for the conditions. If there are two conditions, ____ combinations will exist.
answer
4
question
The symbol that represents a logical OR in Java, C++, and C# is ____.
answer
||
question
The conditional AND operator in Java, C++, and C# is ____.
answer
&&
question
For maximum efficiency, a good rule of thumb in an OR decision is to ____.
answer
first ask the question that is more likely to be true
question
In most programming languages the, ____ sign means "greater than."
answer
>
question
The type of nested if-then-else structure that could be replaced with a case structure is ____.
answer
inner if within the else portion of the outer if
question
In a truth table, the expression ____ is true.
answer
true AND true
question
What is the difference between a While loop with a pre-test and a While loop with a post-test?
answer
The only difference is that a pre-test loop tests the looping condition before executing the body of the loop. If the condition is initially false, then the loop of the body is never executed.
question
What is the difference between counters and accumulators?
answer
Counters are incremented by one, and accumulators are updated by the value of a variable.
question
Which of the following is NOT one of the three things that should happen to a loop control variable (LCV) in a simple While loop?
answer
the LCV should be reset after the loop
question
Console Output is characterized by
answer
all of the above
question
The Exit Loop statement causes control to jump directly to _________ .
answer
the statement following the current loop
question
Any valid statement can occur inside the body of a loop, including input, assignment, output, conditions, and even other loops.
answer
True
question
Which of the following statements is NOT true?
answer
Nested loops must have at least one For loop
question
When a value is incremented ____.
answer
1 is added to the value
question
When one loop appears inside another, the loop that contains the other loop is called the ____ loop.
answer
outer
question
Once a program enters the body of a structured loop, ____.
answer
the entire loop must execute
question
The ____ loop provides three actions in one compact statement.
answer
for
question
At the beginning of any method, it is the programmer's responsibility to initialize all variables that must start with a specific value.
answer
True
question
Every high-level computer programming language contains a while statement.
answer
True
question
In a for loop, a(n) ____ value is used to control how the loop control variable is incremented.
answer
step
question
In Visual Logic, when a program tries to access an array element using a subscript that is larger than the array size, an error occurs.
answer
True
question
Array subscripts are always __________ .
answer
integers
question
The Bubble Sort algorithm is a simple sorting technique that swaps adjacent array elements when they are out-of-order. Which of the following three lines of code will swap the values of A(4) and A(5)?
answer
Temp = A(4) A(4) = A(5) A(5) = Temp
question
When each element in one array has a corresponding value in another array, the two arrays are __________ .
answer
parallel
question
Arrays tend to make programs __________ that they would be without arrays.
answer
shorter
question
You should always loop through an array by starting with the smallest index value.
answer
False
question
When values are explicitly assign to array elements, they are said to be ____.
answer
hard-coded
question
Array subscripts are always ____.
answer
integers
question
An array is a(n) ____ of variables in memory.
answer
list
question
____ is true of arrays.
answer
Only whole numbers can be used as array subscripts.
question
Every array has a(n) ____ size.
answer
finite
question
To start all array elements with the same initial value, you can use an initialization loop.
answer
True
question
Programs with arrays are easier to modify when a named constant is used to hold the size of the array.
answer
True
question
An array is said to be ____ sized if it is automatically given a size based on the list of provided values.
answer
implicitly
question
The number of elements in an array is called the ____ of the array.
answer
size
question
An array can be used to replace ____.
answer
nested decisions
question
In an array with 40 elements, the highest usable subscript is ____.
answer
39
question
____ is another name for an array.
answer
matrix
question
Providing array values is called ____.
answer
populating the array
question
If you declare a variable Boolean, you can set its value to ____.
answer
true or false
question
Parallel arrays must contain the same data type.
answer
False
question
Arrays whose size can be altered are ____ arrays.
answer
dynamic
question
The type of loop____, is used to set the initial value for array variables.
answer
initialization
question
A parallel array is an array that stores another array as each element.
answer
False
question
Which of the commands below have the same effect as the following two commands: Turn Right 90 Forward 100
answer
Turn Left 270
question
A recursive procedure is a procedure that calls itself.
answer
True
question
When calling a procedure with two arguments, the order of the actual arguments passed to the procedure matters. (In other words, passing A as the first argument and B as the second argument is different than passing B first and A second).
answer
True
question
The __________ arguments are specified at the time of the procedure call. They appear inside parentheses after the name of the procedure being called.
answer
actual
question
Visual Logic graphics are a variation on
answer
Logo Turtle graphics
question
The __________ arguments are part of the procedure itself. They are declared when the procedure is declared. They appear in parenthesis in the first element of the procedure code, and these arguments are used as variables inside the procedure code.
answer
formal
question
If a method expects arguments of diverse types, passing them in the wrong order will results in a(n) ____.
answer
syntax error
question
When you overload a method, you run the risk of creating ____.
answer
ambiguous methods
question
Parameter and argument are synonyms and can be used interchangeably.
answer
False
question
Of the following,____, is true of a method's return type.
answer
It can be any data type.
question
The value returned from a method is not required to be a variable.
answer
True
question
Using a black box means you can examine what goes in and what comes out, but not the details of how it works.
answer
True
question
A useful way of planning a module is to document input, output, and ____.
answer
processing
question
____ refers to how the internal statements of a module or subroutine serve to accomplish the module's purposes.
answer
Cohesion
question
A(n) ____ statement passes a value back to the calling method.
answer
return
question
____ occurs when modules do not depend on others.
answer
Loose coupling
question
If method arguments are of the same type, passing them to the method in the wrong order results in a(n) ____.
answer
logic error
question
You should strive for ____ in all methods you write.
answer
functional cohesion
question
When all of the operations in a module contribute to perform one task, it has ____.
answer
functional cohesion
question
A module that performs tasks based on a decision statement has ____ cohesion.
answer
logical
question
Any program can contain an unlimited number of methods, but each method can be called only once.
answer
False
question
A variable that is passed into a method is passed by ____.
answer
value
question
In most modern programming languages such as Java and C++, parameters in the header are separated by the ____ character.
answer
, (comma)
question
You need to understand a subroutine's ____ in order to use it.
answer
interface
question
With ____, there are many chances for bad data to pass from one module to another, and many chances for one module to alter information needed by another module.
answer
tight coupling
Get an explanation on any task
Get unstuck with the help of our AI assistant in seconds
New