Vous êtes sur la page 1sur 59

Test Bank

Problem Solving and Programming Concepts, 9th Ed.


Authors: Maureen Sprankle and Jim Hubbard
Unit One: Introduction to Problem Solving and Programming
Chapter 1: General Problem-Solving Concepts
True or False:
1.1. A heuristic and an algorithmic solution require the same type of problem solving to develop a step by
step solution to a problem.
Answer: F
1.2. Identifying the problem is the first step in problem solving.
Answer: T
1.3. Defining the knowledge base is part of understanding the problem.
Answer: T
1.4. The result of a problem is a set of step by step instructions.
Answer: F
1.5. All problems can be solved by writing a set of step by step instructions for a computer.
Answer: F
1.6 It is not important to evaluate a solution.
Answer: F
1.7 The more alternative solutions that are identified, the better chance you have of a good solution.
Answer: T
1.8 Any solution should be considered when solving a problem.
Answer: F
1.9 You can find a step-by-step solution for any problem as long as you understand the problem.
Answer: F
1.10 Problems that require a heuristic solution cannot be solved through a set of step by step instructions.
Answer: T
Multiple Choice:
1.11. Step 3 in problem solving is to identify alternative ways to solve the problem. This means:
a. To define the knowledge base of all participants.
b. To write a list of pros and cons for each solution.
c. To identify as many solutions as possible to the problem.
d. To identify a few solutions to the problem.
Answer: C

1.12. The last step in problem solving is to evaluate the solution. This means:
a. To check if the knowledge base for errors.
b. To check if the set of step by step instructions developed in step 5, list instructions that enable you to
solve the problem, solve the problem identified in step 1.
c. To check is the solution solves a problem.
d. To test for understanding of the identified problem.
Answer: B
1.13. An algorithm is:
a. A solution that can not be reached through a set of step by step instructions.
b. The results of the problem.
c. The set of step by step instructions to solve the problem.
d. The knowledge base of a solution.
Answer: C
1.14. Step 4 is to select the best way to solve the problem. This means:
a. To weed out unacceptable solutions.
b. To specify pros and cons of each valid solution.
c. Select one solution after weighing the pros and cons.
d. All of the above.
Answer: D
1.15. A problem that requires a heuristic solution might be:
a. Balancing your checkbook.
b. Choosing stock on the stock market.
c. A calculus problem.
d. Baking a cake.
Answer: B
1.16 The solution to a problem is
a. The set of step-by-step instructions to solve the problem.
b. The program
c. The results.
d. All of the above.
Answer: A
1.17. After you have identified alternative solutions
a. You are ready to evaluate the solution(s).
b. You are ready to select the best solution.
c. You are ready to write the algorithm.
d. You are ready to identify the knowledge base.
Answer: B
1.18. To select the best solution, you should
a. Identify and list the pros and cons of each alternative solution.
b. Develop an algorithm for each solution.
c. Develop the knowledge base for each solution.
d. Identify the problem.
Answer: A

1.19. To create a set of instructions to make Otto walk in a figure other than a square, the following
instruction(s) would need to be added to the instruction set:
a. Turn 1 degree, turn is always right.
b. Turn x degrees, where x is a given number of degrees in an angle, turn is always right.
c. Turn x degrees, where x is a given number of degrees in an angle, turn is always left.
d. Any of the above.
Answer: D
1.20. A set of step-by-step instructions is processed:
a. In the order they are presented and processed.
b. Can skip around to other instructions.
c. Can return to a previously processed instruction.
d. In random order.
Answer: A
1.21. The set of step-by-step instructions written for the solution to a problem must:
a. Be within the knowledge base of the problem.
b. Can use any instruction, regardless of the user or the machine.
c. Does not have to be in order of processing.
d. All of the above.
Answer: A
1.22. To identify the best alternative solutions you should:
a. Use other peoples ideas as well as your own.
b. Use only your own ideas.
c. Use any solution, no matter how unacceptable it is.
d. Identify only the first few that you think about.
Answer: A
1.23. When writing a set of instructions for the computer:
a. The instructions must be in proper order.
b. The instructions must be complete.
c. The instructions assume the computer knows nothing.
d. All of the above.
Answer: D
1.24. A problem that would require an algorithmic solution is:
a. Playing a game of chess.
b. Making a cup of cocoa.
c. Deciding which stock to buy.
d. All of the above.
Answer: B
1.25. Computers can best deal with problems that require:
a. Large amounts of calculations.
b. Reasoning.
c. Trial and error.
d. All of the above.
Answer: A

Chapter 2: Beginning Problem-Solving Concepts for the Computer


True or False:
2.1. Numerical data includes all integer numbers and all real numbers.
Answer: T
2.2. Character data includes all numerical data.
Answer: F
2.3. True (T, y, or yes) and False (F, n, or no) are the only values in the logical data set.
Answer: T
2.4. An equation and an expression are the same thing.
Answer: F
2.5. A function is a set of instructions to input data into the computer.
Answer: F
2.6. The hierarchy of operations identifies the order in which the operators are executed.
Answer: T
2.7. The NOT operator reverses the operand.
Answer: T
2.8. The = operator is mathematical operator.
Answer: F
2.9 The = sign is an operator as well as part of an assignment statement.
Answer: T
2.10. A parameter is the data required to process an assignment statement.
Answer: F
Multiple Choice:
2.11. A variable:
a. Is stored in a named memory location.
b. Can be changed while a solution is being executed.
c. Is given a specific data type.
d. All of the above.
Answer: D
2.12. String data:
a. Is group of characters.
b. Can be used to calculate expressions.
c. Contains all other data types.
d. Does not use quotes around the characters.
Answer: A

2.13. In the following expression, what is the order of execution of the operators and the result, given A = 4,
B = 5, E = 3, G = True, F = True?
A * B + 7 > E ^ 3 OR NOT G AND F
a. *, +, >, ^, NOT, AND : Result is True
b. AND, NOT, >, ^, *, +, : Result is False
c. ^, *, +, >, NOT, AND, OR : Result is True
d. ^, *, +, >, NOT, AND, OR : Result is False
Answer: C
2.14. Evaluate the following equation for R, given A = 4, B = 5, C = 8 is:
R = A + B * 2 (C + 4) / A
a. 11
b. 10
c. 12
d. 15
Answer: A
2.15. In the equation: R = A + B * 2 (C + 4) / A, the operands are:
a. +, *, -, /
b. A, B, C
c. R
d. =
Answer: B
2.16. An ideal variable name for a client name is:
a. C
b. Cli
c. Client_name
d. CN
Answer: c
2.17. The concatenation of 4 and 10 is:
a. 410.
b. 410
c. 40.
d. 40.
Answer: B
2.18. The data type of a parameter may be:
a. a constant.
b. a variable.
c. an expression.
d. all of the above.
Answer: D
2.19. In the expression 4 + 10, the operand(s)
a. are the 4 and the 10.
b. is the +.
c. is 14.
d. none of the above.
Answer: A

2.20. In the function LEFT(S,3), the parameter(s):


a. Is LEFT.
b. Are S and 3.
c. Is S.
d. Is 3.
Answer: B
2.21. Mathematical operators include among others:
a. +, -, =
b. >, *, /
c. NOT, MOD, \
d. MOD, *, ^
Answer: D
2.22. The resultant of A OR B
a. Is always true.
b. Is always false.
c. Is always true except when A and B are both false.
d. Is always false except when A and B are both false.
Answer: C
2.23. If the operands are both numerical, and the operator is relational, the data type of the resultant is:
a. Numerical.
b. Relational.
c. Logical.
d. None of the above.
Answer: B
2.24. In the following equation under what conditions would PriorityUse be True?
PriorityUse = (ValidCard AND TimeNoted) OR (Computer AND GuestCard)
a. ValidCard is True, TimeNoted is True, Computer is True, GuestCard is False.
b. ValidCard is False, TimeNoted is True, Computer is False, GuestCard is True.
c. ValidCard is True, TimeNoted is False, Computer is True, GuestCard is False.
d. All of the above.
Answer: D.
2.25. The data type of ZipCodes:
a. Must always be numeric data.
b. Must always be string data.
c. Can be either numeric or string data.
d. None of the above.
Answer: B

Chapter 3: Planning Your Solution


True or False:
3.1. UML (Unified Modeling Language) is a basic tool when using Object Oriented Programming stucture.
Answer: T
3.2. The problem analysis chart is used to glean needed information and data from a problem.
Answer: T
3.3. An Interactivity chart shows the order that the instructions are executed.
Answer: F
3.4. A flowchart is a graphical representation of an algorithm.
Answer: T
3.5. Internal documentation is written for the user of the program.
Answer: F
3.6. Syntax refers to how many errors are found in a solution.
Answer: F
3.7. Debugging refers to the process of finding and correcting the errors in a solution.
Answer: T
3.8. A module is a set of instructions that processes a subtask of a solution.
Answer: T
3.9. The Control Module is a subtask of the Print Module.
Answer: F
3.10. Instructions in an algorithm must be complete and be executed one step at a time.
Answer: T
Multiple Choice:
3.11. A computer bug is:
a. A moth on the computer screen.
b. An error in a solution.
c. A computer chip.
d. A problem solving tool.
Answer: B
3.12. A parallelogram in a flowchart represents:
a. The start or end of the solution.
b. A process.
c. Input or Output.
d. A decision.
Answer: C

3.13. When a module is processed:


a. The computer jumps to the module, executes the instructions in the module, and then quits.
b. The computer jumps to the module, executes the instructions in the module, and then returns to the next
executable instruction.
c. The computer jumps to the module, executes the instructions in the module, and then jumps to another
module according to the structure chart.
d. The computer ignores the module and returns later to execute the instructions.
Answer: B
3.14. The algorithms:
a. Are the finished sets of programming instructions as written in a specific computer language.
b. Is the set of step by step instructions divided into the specific parts, or modules.
c. Are the words written inside the flowchart.
d. Are the modules outlined in a data flow pattern.
Answer: B
3.15. The IPO chart:
a. Shows the input, the processing, the output, and the module numbers.
b. Information is from the structure chart and the program analysis chart.
c. Shows which module each processing step is found.
d. All of the above.
Answer: D
3.16. The Problem Analysis Chart:
a. Has Three parts: the given data, the required results, and the processing required.
b. Has Four parts: the given data, the required results, the processing required, and the solution alternatives.
c. Helps to delete the words from a problem.
d. All of the above.
e. A and C.
Answer: E
3.17. In an algorithm:
a. The instructions cannot assume anything.
b. The instructions cannot skip any steps.
c. The instructions must be executed one at a time.
d. All of the above.
Answer: D
3.18. In a flowchart the diamond indicates:
a. A decision.
b. Input/output.
c. Processing.
d. Start.
Answer: A
3.19. An annotated flowchart includes:
a. The test results.
b. The algorithm.
c. The internal documentation.
d. All of the above.
e. a and c.
Answer: E

3.20. Testing the solution:


a. Provides a validation of the solution.
b. Is not necessary.
c. Does not find logic errors.
d. Should only be done after the program on the computer is completed.
Answer: A
3.21. Internal documentation:
a. Provides communication to the user.
b. Is unnecessary.
c. Provides communication and reminders to the programmer.
d. None of the above.
Answer: C
3.22. External documentation:
a. Provides communication to the user.
b. Is unnecessary.
c. Provides communication and reminders to the programmer.
d. None of the above.
Answer: A
3.23. When using the problem solving tools, the first one to use is:
a. PAC Chart.
b. IPO Chart.
c. Algorithm.
d. Flowchart.
Answer: A
3.24. An example of data found in a file would be:
a. Student name.
b. All personnel data.
c. One employees personnel data.
d. A quantity
Answer: B
3.25. When a flowchart does not fit on a page:
a. The module needs to end.
b. Use off page connectors.
c. Use on page connectors.
d. Tape another piece of paper on the bottom or side of the flowchart page.
Answer: B
3.26. Which of the following diagrams would you use when problem solving using UML:

a. Use case diagrams


b. Class diagrams
c. Sequence diagrams
d. State chart diagrams
e. Activity diagrams.
f. All of the above.
Answer: F

Unit Two: Logic Structures


Chapter 4: An Introduction to Programming Structure
True or False:
4.1. Cohesion is the ability of a module to be independent from other modules.
Answer: T
4.2. Modules are not necessary to use when programming.
Answer: F
4.3. Modules should have a designated function.
Answer: T
4.4. The value of a local variable is available to all other modules.
Answer: F
4.5. The value of a parameter is available to all other modules.
Answer: F
4.6. The value of a global variable is available to all other modules.
Answer: T
4.7. A solution is just as easy to read and understand if it is written in one module or many modules.
Answer: F
4.8. The use of modules many times eliminates rewriting the same instructions.
Answer: T
4.9. The Wrap-up module processes only those instructions that are at the end of a series of other modules
before continuing to other modules.
Answer: F
4.10. The actual parameter listing is the list of parameters that follow the module name at the beginning of
the module.
Answer: F
Multiple Choice:
4.11. Coupling allows:
a. Data to be passed from one module to all other modules.
b. Data to be passes from one module to another module.
c. Data to be unavailable to other modules.
d. Instructions to be available to other modules.
Answer: B
4.12. Data can be made available to other modules through the use of:
a. Parameters.
b. Global variables.
c. Return values.
d. All of the above.
Answer: D

10

4.13. Call-by-reference parameters pass values:


a. By passing the value of the variable.
b. By making the variable global.
c. By passing the memory location of the variable.
d. None of the above.
Answer: C
4.14. A coupling diagram shows:
a. How the data is passed from one module to another.
b. The test values of the variables.
c. How the modules process the data.
d. Where the variables are located in the modules.
Answer: A
4.15. The data dictionary is:
a. A list of definitions of words used in the development of the solution.
b. A list of definitions and attributes of the variables used in the solution.
c. A table the computer uses internally to define the memory location of the variables.
d. A table of values to test the solution of the problem.
Answer: B
4.16. Cohesion relates to:
a. The ability to share data between modules.
b. The ability to have local variables shared between modules.
c. The functional independence of each module.
c. All of the above.
Answer: C
4.17. Modules should:
a. Have one function.
b. Have one entrance and one exit.
c. Be short and easily read.
d. All of the above.
e. a and c.
Answer: D
4.18. Calculations may be found:
a. In any module.
b. Only in the calculation modules.
c. Only in any process modules.
d. Any module but the Wrap-up module.
Answer: A
4.19. Call-by-value parameters:
a. Pass the changed value back to the calling module.
b. Can be changed in the called module.
c. Pass the unchanged (oringinal) value back to the calling module.
d. Cannot be changed in the called module.
e. b and c.
f. c and d.
Answer: E

11

4.20. The variable names in the formal and actual parameter listings:
a. Must be the same.
b. May be the same.
c. Cannot be the same.
d. Only the call-by-value names must be the same.
Answer: B
4.21. The sequential logic structure:
a. Processes instructions in order of listing.
b. Allows the computer to make a choice of two paths to follow.
c. Allows the computer to repeat instructions.
d. Allows the computer to make a choice of two or more paths to follow.
Answer: A
4.22. The decision logic structure:
a. Processes instructions in order of listing.
b. Allows the computer to make a choice of two paths to follow.
c. Allows the computer to repeat instructions.
d. Allows the computer to make a choice of two or more paths to follow.
Answer: B
4.23. The loop logic structure:
a. Processes instructions in order of listing.
b. Allows the computer to make a choice of two paths to follow.
c. Allows the computer to repeat instructions.
d. Allows the computer to make a choice of two or more paths to follow.
Answer: C
4.24. The case logic structure within the decision logic structure:
a. Processes instructions in order of listing.
b. Allows the computer to make a choice of two paths to follow.
c. Allows the computer to repeat instructions.
d. Allows the computer to make a choice of two or more paths to follow.
Answer: D
4.25. The values of local variables:
a. Are defined within a module.
b. Are defined within the calling module.
c. Can only be changed within the module.
d. Are available to any called module.
Answer: A

12

Chapter 5: Problem Solving with the Sequential Logic Structure


True or False:
5.1. The sequential logic structure allows decisions to be made.
Answer: F
5.2. The problem analysis chart, the IPO chart, the structure chart, the algorithms, and the flowchart are all
tools to be used in the development of a solution to a problem.
Answer: T
5.3. The algorithm and the flowchart are the same thing.
Answer: F
5.4. The equals sign in an assignment statement really means equals to.
Answer: F
5.5. The word end and exit can be used interchangeably according to the desire of the developer.
Answer: F
5.6. The Return instruction is used to end a module.
Answer: T
5.7. The Return instruction and the Exit instruction are exactly the same and can be used interchangeably.
Answer: F
5.8. An instruction has two parts: the general instruction followed by the specifications on how to execute
the instruction.
Answer: T
5.9. In a coupling diagram, all variables are indicated in the same way.
Answer: F
5.10. It is not important to indicate what documentation is needed as you are developing the solution.
Answer: F
Multiple Choice:
5.11. The flattened ellipse in a flowchart indicates:
a. A process.
b. An input or output instruction.
c. A decision.
d. The start or stop of the module.
Answer: D
5.12. The rectangle in a flowchart indicates:
a. A process.
b. An input or output instruction.
c. A decision.
d. A module to be processed.
Answer: A

13

5.13. The algorithm of a module always starts with:


a. A flattened ellipse.
b. The module name and number.
c. The name of the program.
d. The name of the developer.
Answer: B
5.14. The interactivity (structure) chart is developed by:
a. Using the similar types of modules for all programs.
b. Breaking the total solution into functional parts called modules.
c. Placing the names and numbers of the modules in rectangles which are then placed on the chart in a
hierarchical fashion to show which modules process which other ones.
d. All of the above.
Answer: D
5.15. The external documentation is:
a. Written for the developer.
b. Written for the user.
c. Written to clarify the logic of the program.
d. All of the above.
Answer: A
5.16. Of the several problem solving tools introduced, which provides the BEST view of the program logic
in two-dimensions.
a. Flowchart
b. Algorithm
c. Problem Analysis Chart
d. IPO Chart
Answer: A
5.17. Of the several problem solving tools introduced, which provides the BEST view of the pseudocode
a. Flowchart
b. Algorithm
c. Problem Analysis Chart
d. IPO Chart
Answer: B
5.18. Of the several problem solving tools introduced, which provides the BEST view of the alternative
solutions
a. Flowchart
b. Algorithm
c. Problem Analysis Chart
d. IPO Chart
Answer: C
5.19. The sequential logic structure:
a. May be used with other logic structures.
b. Is used is almost all solutions.
c. Concludes with a return, an end, or an exit.
d. All of the above.
Answer: D

14

5.20. The IPO chart:


a. Separates the data from the required results from the required processing when identifying the problem.
b. Designates the modules in which the individual processing is completed.
c. Gives a graphic representation of the solution.
d. All of the above.
Answer: B
5.21. The data dictionary:
a. Designates the data type of each piece of data used in the solution.
b. Designates any pseudonyms of each piece of data.
c. Designates the scope of the data.
d. All of the above.
e. None of the above.
Answer: D
5.22. In the development of a solution:
a. The IPO chart is developed first.
b. The PAC is developed first.
c. The algorithms and flowcharts are developed together.
d. a and c.
e. b and c.
f. None of the above.
Answer: E
5.23. The rectangle with double lines on the sides indicates:
a. A decision.
b. A process.
c. A module to be processed.
d. An assignment instruction.
Answer: C
5.24. Accompanying the module name at the beginning of the algorithm includes:
a. Parameters and module number.
b. Parameters, local variables, and module number.
c. Local variables and module number.
d. Nothing
Answer: A
5.25. Accompanying the return instruction is:
a. Nothing.
b. The value of return through the name of the module.
c. Parenthesis only.
d. Return values of the call-by-value parameters.
Answer: B

15

Chapter 6: Problem Solving with Decisions


True or False:
6.1. The decision logic structure is probably the most important logic structure because it allows the
computer to make decisions.
Answer: T
6.2. Multiple IF/THEN/ELSE instructions allows the computer to choose a path from many paths of
execution according to specific conditions.
Answer: T
6.3. A decision table allows the developer to make sure all possible combinations of results of the
conditions have actions.
Answer: T
6.4. A flowchart can not be made from a decision table.
Answer: F
6.5. Straight through logic is the fastest decision logic when there are several choices of actions.
Answer: F
6.6 Indentations are used to increase readability.
Answer: T
6.7. Logical or relational operators are required in the condition of the IF/THEN/ELSE instruction.
Answer: T
6.8. Only assignment instructions are allowed in the true and false statements.
Answer: F
6.9. If at all possible, straight through logic should be used in multiple IF/THEN/ELSE instructions.
Answer: F
6.10. The decision table is an important communication tool when working with a client.
Answer: T
6.11. The case logic structure allows the repetition and choice of multiple sets of instructions.
Answer: F
6.12. The OTHERWISE is a catchall choice when there are no other matches in the case logic structure.
Answer: T
6.13. There must be only one instruction for each constant in a case logic structure.
Answer: F
6.14. The use of the OTHERWISE in the case logic structure may be used as error detection.
Answer: T

16

Multiple Choice:
6.15. A single decision logic structure:
a. Allows the computer to choose from two paths of execution according to a specified condition.
b. Predetermines a path the computer needs to take for all sets of data.
c. Allows the computer to choose from two or more paths of execution according to specified conditions.
d. All of the above.
Answer: A
6.16. Using the decision straight through logic structure for multiple decisions:
a. Has the true proceeding to the next instruction and the false executing an action.
b. Has the true proceeding to another IF/THEN/ELSE instruction and the false executing an action.
c. Has the false proceeding to the next instruction and the true executing an action.
d. None of the above.
Answer: C
6.17. The use of positive logic or negative logic:
a. Has either the true or the false proceeding to another IF/THEN/ELSE instruction.
b. Has either the true of the false proceeding to execute an action and then proceed to the next instruction.
c. With the exception of the last nested IF/THEN/ELSE instruction does not allow both the true and the
false to execute an action.
d. All of the above.
Answer: D
6.18. A decision table consists of:
a. The conditions and the actions.
b. The conditions and the consequences.
c. The conditions, the combinations of T/F for the conditions, and the consequences.
d. None of the above.
Answer: C
6.19. The types of nested IF/THEN/ELSE instructions are:
a. Positive and negative logic structure.
b. Straight through logic structure.
c. Positive logic structure , negative logic structure, and a logic structure that has actions or other
IF/THEN/ELSE instructions on both the true and false parts of the instruction.
d. Positive, negative, and straight through logic.
Answer: C
6.20. The ELSE part of the IF/THEN/ELSE instruction:
a. Is optional.
b. Contains the false instruction.
c. Must be used in nested IF/THEN/ELSE instructions.
d. All of the above.
e. b and c.
Answer: D
6.21. Straight-through logic:
a. Does not use the ELSE.
b. Is used when the conditions in the IF/THEN/ELSE instructions are unrelated.
c. Is using sequential logic structure to execute the decision instructions.
d. All of the above.
e. a and b.
Answer: D

17

6.22. The indented algorithm of a positive logic nested IF/THEN/ELSE looks like:
a. A sideways V on the left side.
b. A straight vertical line on the left side.
c. A diagonal line on the left side.
d. None of the above.
Answer: C
6.23. The indented algorithm of a negative logic nested IF/THEN/ELSE looks like:
a. A sideways V on the left side.
b. A straight vertical line on the left side.
c. A diagonal line on the left side.
d. None of the above.
Answer: A
6.24. The indented algorithm of straight through multiple IF/THEN/ELSE instructions looks like:
a. A sideways V on the left side.
b. A straight vertical line on the left side.
c. A diagonal line on the left side.
d. None of the above.
Answer: B
6.25. The false statements are always executed using:
a. Straight-through logic.
b. Positive logic.
c. Negative logic.
d. None of the above.
Answer: D
6.26. To decide which decision logic to use when using multiple IF/THEN/ELSE instructions, you should:
a. Consider which type is the easiest for you to develop.
b. Consider which type is the most readable and machine efficient.
c. Consider which type is the easiest to maintain.
d. All of the above.
e. a and c.
f. b and c.
Answer: F
6.27. Decision tables:
a. Are used for developing company policies to include in a solution.
b. Are used for the developer to communicate the solution to the client.
c. Are rarely used.
d. All of the above.
e. a and b.
f. b and c.
Answer: E
6.28. The diamond is used in the flowchart to indicate the decision logic structure. The flowlines from the
diamond:
a. Indicates the entrance on the top, the exit on the bottom, and the true and false from the sides.
b. Indicates the entrance on the top and the true and false from the sides.
c. May flow to or from the diamond from any of the corners.
d. Only use the sides and not the corners of the diamond.
Answer: C

18

6.29. When using positive or negative logic, when there are no true statements:
a. The THEN part may be excluded.
b. The positive and negative logic are reversed so there will be true statements.
c. A Continue statement is used to preserve the THEN part.
d. All of the above.
e. b and c.
f. a and b.
Answer: E
6.30. A good application for the case structure is
a. Medical deductions
b. Payroll calculations
c. Changing a specific character to a specific numeric value
d. All of the above
Answer: d
6.31. The case logic structure algorithm:
a. Starts with an IF and ends with an IF/END.
b. Starts with a CASE OF VARIABLE and ends with the OTHERWISE.
c. Starts with a CASE OF VARIABLE and ends with an END-OF-CASE.
d. None of the above.
Answer: C
6.32. Case logic structure may be used to:
a. Indicate a specific set of instructions to be used.
b. Indicate only one instruction for multiple values of a variable.
c. Indicate a specific value for a variable.
d. a and d
e. None of the above.
Answer: D
6.33. Case logic structure is a type of:
a. Sequential logic structure
b. Decision logic structure
c. Loop logic structure..
d. None of the above.
Answer: B
6.34. The data type of the constants:
a. May be numeric, string, or character.
b. Must be the same data type as the variable.
c. Must all be the same data type in one case logic structure.
d. All of the above.
e. a and b.
f. b and c.
Answer: D

19

Chapter 7:Problem Solving with Loops


True or False:
7.1. Accumulating and counting a set of data can be accomplished by using the loop logic structure.
Answer: T
7.2. Incrementing is done by adding a variable to another variable.
Answer: F
7.3. Accumulating allows the developer to total a group of numbers.
Answer: T
7.4. The conditional test is made at the end of the loop in a WHILE/WHILE-END instruction.
Answer: F
7.5. When using an automatic counter loop, the counter can be decremented through the use of a negative
number for the step.
Answer: T
7.6. The conditional test is made at the end of the REPEAT/UNTIL instruction.
Answer: T
7.7. When using a WHILE/WHILE-END instruction, if the condition is false before entering the loop, the
loop instructions will still be processed one time.
Answer: F
7.8. When using a REPEAT/UNTIL instruction, if the condition is false before entering the loop, the loop
instructions will still be processed at least one time.
Answer: T
7.9. Automatic counter loops should be used only when you do not know how many times the loop should
be executed.
Answer: F
7.10. All loop structures use the diamond in the flowchart to indicate a loop.
Answer: F
Multiple Choice:
7.11. When using a REPEAT/UNTIL instruction:
a. The condition is executed after the last of the repeated instructions, at which time the execution continues
with the next instruction after the loop when the condition is false and continues with the first of the
repeated instruction when the condition is true.
b. The condition is executed after the last of the repeated instructions, at which time the execution
continues with the next instruction after the loop when the condition is true and continues with the first of
the repeated instruction when the condition is false.
c. The condition is executed at the beginning of the repeated instructions, at which time the execution
continues with the next instruction after the loop when the condition is false and continues with the first of
the repeated instruction when the condition is true.
d. The condition is executed at the beginning of the repeated instructions, at which time the execution
continues with the next instruction after the loop when the condition is true and continues with the first of
the repeated instruction when the condition is false.
Answer: B

20

7.12. In an automatic counter loop, the instructions are repeated until:


a. A given condition is true.
b. A given condition is false.
c. The counter becomes larger than the ending number.
d. The counter becomes equal to the ending number.
Answer: C
7.13. When nesting loops:
a. The outer loop instructions are executed once for every time the inner loop instructions are executed.
b. The inner loop instructions are executed the required times for every time the outer loop instructions are
executed once.
c. The outer loop instructions are executed the required time for every time the inner loop instructions are
executed.
d. None of the above.
Answer: B
7.14. An indicator:
a. Can be a conditional end to the execution.
b. Can be trip value to exit a loop.
c. Can be used in error checking.
d. All of the above.
Answer: D
7.15. The loop logic structure:
a. Allows decisions to be made.
b. Allows instructions to be repeated.
c. Allows for the execution of multiple paths.
d. All of the above.
Answer: B
7.16. What will be printed when the following algorithm is processed?
COUNTER = 0
DISTRIBUTION = 500
WHILE DISTRIBUTION > 200 AND COUNTER < 5
GIVEAWAY = DISTRIBUTION * .5
PRINT GIVEAWAY
DISTRIBUTION = DISTRIBUTION GIVEAWAY
COUNTER = COUNTER + 1
WHILE-END
a. 250
b. 250, 125
c. 150, 125, 62.5
d. None of the above
Answer: B
7.17. The product of a series of numbers may be calculated in the same manner as accumulating with the
exception of:
a. The initialized product variable must be 1.
b. The operator is changed from a + to a *.
c. Nothing is changed.
d. You cannot do a product in a loop.
e. a and b.
f. None of the above.
Answer: E

21

7.18. Indentation is used in the algorithm of loops:


a. To indicate which instructions are to be repeated.
b. To indicate the beginning and end of the loop.
c. To indicate the entire loop.
d. None of the above.
Answer: A
7.19. Brackets are used in the algorithm of loops:
a. To indicate which instructions are to be repeated.
b. To indicate the beginning and end of the loop.
c. To indicate the entire loop.
d. None of the above.
Answer: C
7.20. The start, stop, and step values in an automatic counter loop:
a. Must all be constants.
b. May be constants or variables.
c. Must all be variables.
d. May be constants, variables, or expressions.
e. None of the above.
Answer: D
7.21. When using the WHILE/WHILE-END and the REPEAT/UNTIL loops:
a. The conditional values do not need to be changed within the loop.
b. The conditional values must be changed within the loop.
c. The loop will automatically stop after a designated number of times.
d. a and c.
e. None of the above.
Answer: C
7.22. When using the automatic counter loop:
a. The ending value is optional if you have another way to exit the loop.
b. The step value is optional.
c. The starting value is optional.
d. None of the above.
e. All of the above.
Answer: B
7.23. In order to accumulate values or increment a value:
a. You may use an IF/THEN/ELSE instruction.
b. You must use a loop instruction.
c. You may use an IF/THEN/ELSE instruction within a loop instruction.
d. All of the above.
e. None of the above.
f. b and c.
Answer: F
7.24. When using the WHILE/WHILE-END and the REPEAT/UNTIL loops where the conditional values
are input:
a. You must use a primer read.
b. You do not need to use a primer read.
c. You only need to use a primer read in an automatic counter loop.
d. None of the above.
e. b and c.
Answer: A

22

7.25. Recursion:
a. Is a special form of a loop.
b. Is a function that calls itself.
c. Must have a way to halt the calling of the module.
d. All of the above.
e. None of the above.
f. b and c.
Answer: D

23

Unit Three: Data Structures


Chapter 8: Processing Arrays
True or False:
8.1. An array allows the user to use multiple values for one variable name.
Answer: T
8.2. Parallel arrays are two or more arrays where the data in the same element number in all arrays are
related.
Answer: F
8.3. The decision structure is used to enter data into an array.
Answer: F
8.4. A two dimensional array is similar to a table that has rows and columns.
Answer: T
8.5. There are only one-dimensional and two-dimensional arrays.
Answer: F
8.6. A static array has a constant number of memory locations saved for its values.
Answer: T
8.7. Data structures is the way data is stored for usage.
Answer: T
8.8. The element numbers are the same in an array that uses the base-zero system and an array that uses
base-one system.
Answer: F
8.9. You must use an array starting with the first element.
Answer: F
8.10. When using an automatic counter loop to print an array, you must have an incrementor for the
element number.
Answer: F
Multiple Choice:
8.11. Arrays are used:
a. When multiple values of a variable need to be saved in the computers memory to be used later in the
processing.
b. When a variable has more than one value.
c. Anytime when a set of numbers needs to be summed.
d. When the user does not know the number of values needed for a variable.
Answer: A
8.12. Two dimensional arrays are processed:
a. Through the use of nested decisions.
b. Through the use of a case structure.
c. Through the use of nested loops.
d. None of the above.
Answer: C

24

8.13. The table look up technique:


a. Searches sequentially through the table to find the correct value.
b. Uses the element number to find the correct value.
c. Uses the value in one array to find the value in another array.
d. None of the above.
Answer: B
8.14. The frequency distribution technique:
a. Searches sequentially through a table to find the matching values and then counts them.
b. Uses an input value to count the number of equivalent values.
c. Uses the value of an element of one array as the element number of another array and then increments
the value found in that element number.
d. Uses a cross tabulation method of counting the frequency of numbers.
Answer: C
8.15. To sum the rows and columns of a two-dimensional array:
a. The rows are summed, then the columns, and finally the grand total.
b. The columns are summed, then the rows, and finally the grand total.
c. The rows and columns are summed together.
d. The rows and columns are summed in the same inner loop with the results placed in an added row and an
added column. The grand total is summed in the outer loop.
Answer: D
8.16. To print an array, you should use:
a. IF/THEN/ELSE instruction.
b. REPEAT/UNTIL.
c. WHILE/WHILE-END.
d. Automatic counter loop.
Answer: D
8.17. Before loading a static array:
a. You must initialize each element to zero.
b. You do not need to initialize the elements.
c. You must define the array by telling the computer the number of needed elements. This may be done as
the program is being executed.
d. b and c.
e. a and c.
Answer: B
8.18. Parallel arrays:
a. Must be loaded in separate loops.
b. May be loaded in the same loop.
c. Contains data that is unrelated.
d. Must have calculated values.
Answer: B
8.19. When loading arrays:
a. An automatic counter loop must be used.
b. A WHILE/WHILE-END loop, REPEAT/UNTIL loop, or an automatic counter loop may be used.
c. A flag value must be used to stop the entering of data.
d. a and c.
Answer: B

25

8.20. Printing a two dimensional array:


a. Is the same as printing a one-dimensional array.
b. Must have a carriage return after printing each row, instead of after each element.
c. Is printed in a single loop.
d. Does not need a carriage return.
Answer: B
8.21. A two-dimensional array that will accumulate the rows and columns:
a. Should have an additional row and column specified for the totals.
b. Should use two other one-dimensional arrays for the totals.
c. Should have a third dimension for the totals.
d. None of the above.
Answer: A
8.22. A sequential search
a. Starts with the first element of an array and searches each element until the correct one is found.
b. Starts with the last element of an array and searches upward until the correct one is found.
c. Starts with the middle element of an array and searches each direction until the correct one is found.
d. Does not have to have the array in order.
Answer: A
8.23. The binary search
a. Starts with the first element of an array and searches each element until the correct one is found.
b. Starts with the middle element and tests to see if the number is larger or smaller that that element and
continues in the same manner until the element is found.
c. Does not have to have the array in order.
d. Is another name for a sequential search.
Answer: B
8.24. The pointer technique:
a. Points to the correct value in an array by supplying the element number.
b. Uses the value of an element in one array as the element number in another array.
c. Finds the last element in an array with a value other than zero.
d. Allows the developer to point to any element in any array given the element number.
Answer:B
8.25. The cross tabulation technique:
a. Is used for surveys.
b. Is a two-dimensional frequency distribution.
c. Uses the pointer technique.
d. All of the above.
e. b and c.
Answer: D

26

Chapter 9: Sorting, Stacks, and Queues


True or False
9.1. Sorting is done through multiple comparisons and exchanges.
Answer: T
9.2. The sorting technique that requires the least number of comparisons and exchanges is the selectionexchange method.
Answer: F
9.3. Stacks use the first in, first out procedure.
Answer: F
9.4. Queues use the first in, first out procedure.
Answer: T
9.5. The bubble sort bubbles the largest number to the bottom.
Answer: T
9.6. The shell sort is a modification of the selection sort.
Answer: F
9.7. Data structures are the various ways to store data in the computer.
Answer: T
9.8. Sorting Data means to separate data into catagories.
Answer: F
9.10. Queues use pushing and popping to add and delete data.
Answer: F
Multiple Choice:
9.11. The bubble sort:
a. Finds the smallest value and exchanges it with the first value, then continues with the second value, third
value, etc.
b. Is a system of comparisons and exchanges of adjacent elements to move the largest to the bottom of the
selected group of values.
c. Is a system of comparisons and exchanges of elements that are non-adjacent. The gap is halved at each
pass.
d. None of the above.
Answer: B
9.12. When a stack is pushed:
a. The number is entered into the element number in the stack pointer, the stack pointer is then incremented.
b. The stack pointer is incremented, then the number is entered into to element number in the stack pointer.
c. The number is taken out of the stack at the element number in the stack pointer, the stack pointer is then
decremented.
d. The stack pointer is decremented, then the number is taken out of the stack at the element number in the
stack pointer.
Answer: B

9.13. Use the selection exchange method to show the first pass of the following array:

27

Element
Values
1
15
2
23
3
17
4
12
5
65
a. 12, 17, 23, 15, 65
b. 12, 23, 17, 15, 65
c. 15, 17, 12, 23, 65
d. 17, 15, 12, 23, 65
Answer: B
9.14. Use the bubble sort method to show the first pass of the following array:
Element
Values
1
15
2
23
3
17
4
12
5
65
a. 12, 17, 23, 15, 65
b. 12, 23, 17, 15, 65
c. 15, 17, 12, 23, 65
d. 17, 15, 12, 23, 65
Answer: C

9.15. Given a stack, what would the final value of the stack pointer be after the following instructions were
executed:
PUSH 23
PUSH 35
PUSH 42
POP X
PUSH 20
POP X
POP X
PUSH 30
a. 1.
b. 2.
c. 3.
d. 4.
e. 5.
Answer: B
9.16. The Shell sort:
a. Finds the smallest value and exchanges it with the first value, then continues with the second value, third
value, etc.
b. Is a system of comparisons and exchanges of adjacent elements to move the largest to the bottom of the
selected group of values.
c. Is a system of comparisons and exchanges of elements that are non-adjacent. The gap is halved at each
pass.
d. None of the above.
Answer: C
9.17. The selection exchange sort:

28

a. Finds the smallest value and exchanges it with the first value, then continues with the second value, third
value, etc.
b. Is a system of comparisons and exchanges of adjacent elements to move the largest to the bottom of the
selected group of values.
c. Is a system of comparisons and exchanges of elements that are non-adjacent. The gap is halved at each
pass.
d. None of the above.
Answer: A
9.18. When processing a queue:
a. An error occurs when adding data to the queue and the queue is filled.
b. An error occurs when deleting data from the queue and queue is empty.
c. An error occurs when the wrong option is entered.
d. All of the above.
Answer: D
9.20. In a queue:
a. Data is added to the top and deleted from the bottom.
b. Data is added to the bottom and deleted from the top.
c. The data in the queue is moved to the top when data is deleted.
d. The data in the queue is moved down when data is deleted.
Answer: B
9.21. When processing a stack:
a. Additions are at one end and deletions are at the other end.
b. Additions and deletions are both at the same end.
c. Additions are at the top and deletions are at the bottom.
d. Additions are at the bottom and deletions are at the top.
Answer: B

29

Chapter 10: File Concepts


True and False
10.1. Sequential access file may be processed either randomly or sequentially.
Answer: F
10.2. Sorting is the processing categorizing the data.
Answer: F
10.3. The logical file number is a reference number used in the solution.
Answer: T
10.4. A systems flowchart uses the same symbols as an algorithmic flowchart.
Answer: F
10.5. The EOF is a marker after the last record in a file.
Answer: T
10.6. Random access files may process records randomly or sequentially.
Answer: T
10.7. A secondary key is essentially the same as a primary key.
Answer: F
10.8. Instructions such as OPEN and READ uses the LFN within the solution since that number designates
the file in use.
Answer: T
10.9. It is important to design the record with care to save storage space.
Answer: T
10.10. A systems flowchart shows the flow of data between the pieces of hardware.
Answer: F
Multiple Choice
10.11. A random access file:
a. Can be accessed sequentially.
b. Uses many methods of accessing records including linked lists and binary trees.
c. Can access any record without reading through any other records.
d. All of the above.
Answer: D
10.12. A primary key:
a. Is required for all types of files.
b. Should be unique.
c. Is used in conjunction with a secondary key and is less important than the secondary key.
d. Is the only field used to sort the records of a file.
Answer: B

30

10.13. A systems flowchart:


a. Shows the data flow through the complete hardware system.
b. Shows the data flow through the program instructions.
c. Shows the data flow through the modules.
d. Shows the data flow through the internal memory.
Answer: A
10.14. A data record dictionary:
a. Is a list of the terms used in the solution.
b. Is a list of fields in a record and their attributes.
c. Is a list of the data found in the records.
d. Is a list of records in a file and their attributes.
Answer: B
10.15. The primer read is the first record that:
a. Is read as the last instruction in the loop.
b. Is read after the loop ends.
c. Is read as the first instruction in the loop.
d. Is read before the loop begins.
Answer: D
10.16. Files may be processed:
a. Sequentially.
b. Randomly through the use of linked lists.
c. Randomly through the use of binary trees.
d. All of the above.
e. None of the above.
Answer: D
10.17. Buffers are
a. Allow data to be transferred from one storage device to another storage device.
b. Are only used when processing files sequentially.
c. Data holding areas in the computer.
d. All of the above.
e. None of the above.
Answer: C
10.18. When designing records
a. The overall length should be considered.
b. The storage device should be considered.
c. The data type should be considered.
d. All of the above.
e. a and c.
f. a and b.
Answer: E
10.19. The secondary key
a. Is unique.
b. May be used to access records.
c. Is used within the record only.
d. Is the same as the primary key.
Answer: B

31

10.20. The READ (LFN) RECORD


a. Copies the record into the computer memory.
b. Copies the record into a buffer.
c. Transfers the record in the computer memory.
d. Transfers the record into a buffer.
e. a and b.
f. c and d.
Answer: E
10.21. The fields of a record
a. Contain like data for all records.
b. Contain different pieces and number of data items for each record.
c. Contain only character or string data.
d. Contain only numeric data.
Answer: A
10.22. When processing records sequentially
a. The records are processed one at a time starting with the first record.
b. The fields are processed one at a time starting with the first field.
c. The records are processed one at a time starting anywhere in the file.
d. The fields are read one at a time starting anywhere in the record.
Answer: A
10.23. Sequential files
a. Start with a given record number and continues until the file is closed.
b. Start with the first record and end with and EOF.
c. Start with the first record and ends with a file closed instruction.
d. All of the above.
Answer: B
10.24. Sequential files can be processed and maintained
a. As efficiently as random accessed files.
b. More efficiently as random access files.
c. Less efficiently as random access files.
d. As efficiently as random accessed files in some applications.
Answer: C
10.25. When processing sequential files
a. An automatic counter loop is used.
b. A REPEAT/UNTIL loop is used.
c. A WHILE/WHILE_END loop is used.
d. None of the above.
e. b and c.
Answer: E

32

Chapter 11: Linked Lists


True and False
11.1. A linked list uses an extra field in a file to hold the links.
Answer: T
11.2. Linked lists must always be in order.
Answer: F
11.3. You need a head pointer and an empty pointer to process linked lists.
Answer: T
11.4. After adding to and deleting from a linked list, the list must be sorted.
Answer: F
11.5. A circularly linked list has no end.
Answer: T
11.6. A doubly linked list had two or more linked fields.
Answer: F
11.7. A multilinked list has multiple linked fields.
Answer: T
11.8. The linked field shows where the next item of data is to be processed.
Answer: T
11.9. The empty pointer holds the field number of the next empty record.
Answer: T
11.10. The head pointer holds the field number of the next empty record.
Answer: F
Multiple Choice
11.11. A linked list is accessed:
a. Through a linked field. Each linked field value of the record is the next record to be processed.
b. Uses a list pointer to specify which record is the first record to be processed.
c. Uses an empty pointer to specify the first record in which data can be entered.
d. All of the above.
Answer: D
11.12. When using linked lists:
a. New records are always added to the bottom of the file.
b. Deleting data is accomplished by moving all records up, after the deleted record, therefore, eliminating
the deleted record.
c. When data is deleted, the links are changed to jump over the deleted record. The deleted record number
is entered into the empty list.
d. New records are always added to the top of the file.
Answer: C

33

11.13. The number of added field(s) to a file that uses the linked list technique of accessing data are:
a. One.
b. Two.
c. A linked field for each order of processing the file.
d. Two linked fields for each order of processing the file.
Answer: C
11.14. The list pointer maintained with a list contains:
a. The smallest value in the list.
b. The record number of the smallest value in the list.
c. The mid value in the list.
d. The record number of the mid value in the list.
Answer: B.
11.15. The empty pointer maintained with a list:
a. Contains the record number of the next record to be added to the list.
b. Points to a list within a list.
c. If it contains a zero, the next record to be added must added in a newly created record.
d. All of the above
e. a and c.
Answer: D.
11.16. A circularly linked list:
a. Is the same as any other linked list.
b. Has no end, as the list value of the last value in the list points to the record number of the first value in
the list.
c. Is connected to the empty list.
d. b and c.
Answer: B
11.17. In a linked list:
a. Data is held in records.
b. Data is held in arrays.
c. Data is held in separate variables.
d. None of the above.
e. All of the above.
Answer: A
11.18. Each record in a linked list:
a. Has at least one extra field to hold the links.
b. Has all of the related data to one entity of the file.
c. Has only one extra field to hold the links.
d. Used one of the existing fields as the links.
e. a and b.
Answer: E
11.19. The records in a file using a linked list:
a. Must be in order when starting.
b. Must be in order at all times.
c. Does not need to be in order.
d. None of the above.
Answer: A

34

11.20. Deleted records in a linked list are:


a. linked using the empty pointer.
b. deleted from the file.
c. remains in the file until another record is added in its place.
d. a and c.
e. none of the above.
Answer: D

35

Chapter 12: Binary Trees


True and False
12.1. The top of a binary tree is a branch.
Answer: F
12.2. A node on a binary tree may be a leaf.
Answer: T
12.3. A binary tree is the same as a linked list.
Answer: F
12.4. A node at a higher level is called parent.
Answer: T
12.5. The bottom position of the tree is called a root
Answer: F.
12.6. Stacks are used to process a binary tree.
Answer: T
12.7. There are teo branches from every node.
Answer: F
12.8. A binary tree stores data in right brances and left branches.
Answer: T
12.9. There are three ways to process binary trees: Preorder, Inorder, and Postorder.
Answer: T
12.10. Hashing is another method of storing and processing data.
Answer: T
Multiple Choice
12.11. A binary tree:
a. Has a root node.
b. Each node has no more than two branches.
c. Uses stacks to process the nodes.
d. Uses two extra fields for the pointers to the branches.
e. All of the above.
Answer: D

36

12.12. Given the following data, what would the root value be if the tree were transversed as NLR,
(Remember the data should be in alphabetical order. )
Dave
Julie
Martha
Adam
Frank
Peter
Norman
a. Julie
b. Adam
c. Martha
d. Peter
e. Norman
Answer: A
12.13. The added field(s) to a file that uses the binary tree technique of accessing data are:
a. Right branch.
b. Left branch.
c. Root.
d. All of the above.
e. a and b.
f. a and c.
Answer: E
12.14. Transversal of a binary tree:
a. Means the method of accessing and processing the nodes.
b. Has three methods, Preorder, Inorder, and Postorder.
c. Is the method of finding the root.
d. a and b.
d. b and c.
Answer: D.
12.15. To process data using preorder processing:
a. Node is processed first, then the left branch, then the right.
b. The left branch is processed first, then the node and then the right branch
c. The left branch is processed first, then the right branch, and then the node
d. The right branch is processed first, then the node, and then the left branch.
Answer: A
12.16. To process data using inorder processing:
a. Node is processed first, then the left branch, then the right.
b. The left branch is processed first, then the node and then the right branch
c. The left branch is processed first, then the right branch, and then the node
d. The right branch is processed first, then the node, and then the left branch.
Answer: B
12.17. To process data using postorder processing:
a. Node is processed first, then the left branch, then the right.
b. The left branch is processed first, then the node and then the right branch
c. The left branch is processed first, then the right branch, and then the node
d. The right branch is processed first, then the node, and then the left branch.
Answer: C

37

12.18. Preorder processing is abbreviated as:


a. NLR
b. LNR
c. LRN
d. RNL
Answer: A
12.19. Inorder processing is abbreviated as:
a. NLR
b. LNR
c. LRN
d. RNL
Answer: B
12.20. Postorder processing is abbreviated as:
a. NLR
b. LNR
c. LRN
d. RNL
Answer: C

38

Unit 4: Database Management systems


Chapter 13: Database Management
True or False:
13.1. A RDBMS is a data organizer.
Answer: T
13.2. A RDBMS is a relational database since it has a relational field relating two or more tables.
Answer: T
13.3. A query uses conditional expressions to select data.
Answer: T
13.4. Queries build a new table by selecting all or part of the records and/or fields.
Answer: T
13.5 ADBMSdecreasestheoverlapofdata

Answer:T

13.6ADBMSaccesstothedatathroughtheuseofindexingandbuiltinproceduresslows
performanceofthesystem
Answer:F
13.7Constraintsarerulesthatthedatamustadheretoinorderforthedatatobesaved
Answer:T
13.8Triggersarebuiltin,userdefinedroutinesthatoccurwhendataismanipulated,usually
fromadatainsert,update,ordeleteaction.
Answer:T
13.9ADatabaseTransactionusuallyhasabegincommitorbeginrollbackcycledependingon
theoutcomeofthetransaction.
Answer:T
13.10UsingRemoteProcedureCalls(RPCs)orStandardQueryLanguage(SQL)theclient
communicateswithaserver.
Answer: T
Multiple Choice:
13.11. When using database terminology:
a. a table is the same as an entity set.
b. a record is the same as an attribute.
c. a field is the same as an entity
d. none of the above.
e. a, b and c.
Answer: A

39

13.12. When designing a RDBMS:


a. You should start with the needed output reports.
b. You should start with the design of the records.
c. You should start with the division of data into separate tables.
d. You should start with a list of all the data that will be entered into the records.
Answer: A
13.13. The relational field:
a. Does not have to have the same name in both tables.
b. Must have the same name in both tables.
c. Must be unique in both tables.
d. Is not necessary to relate two tables in a DBMS.
Answer: B
13.14. The output reports:
a. Should print all fields in a record.
b. Should print only relevant fields from a record.
c. Should print all records from the table.
d. None of the above.
Answer: B
13.15. RDBMS
a. May use one table.
b. Must use only one table.
c. May use multiple interrelated tables.
d. Must use more than one table.
e. a and c.
f. None of the above.
Answer: E
13.16. Part(s) of a RDBMS include:
a. Data tables.
b. Reports.
c. Query tables.
d. All of the above.
e. None of the above.
Answer: D
13.17. The schema of a RDBMS
a. Divides the fields into interrelated tables.
b. Shows the relationship between tables.
c. Describes the output reports.
d. Allows the user to enter data into the data tables.
Answer: B
13.18. A good application for a RDBMS is:
a. Costing a project.
b. CD collection organization.
c. An English report.
d. Calculating a grade average.
Answer: B

40

13.19. Second normalization takes care of:


a. the insertion anomaly
b. the update anomaly
c. the deletion anomaly
d. the schema
Answer: B
13.20 The Client Server Model started gaining acceptance in:
a. 1970ies
b. 1980ies
c. 1990ies
d. It never gained acceptance.
Answer: B
13.21 The Client Server Model help overcome:
a. Network Traffic
b. Centralized Data
c. Data Access Performance
d. All of the above
e. None of the above
Answer: D
13.22 A Remote Procedure Call (RPC) is used to:
a. Tell the modem to call the internet
b. Pass parameters to, and get results from a store procedure in a DBMS
c. Logon onto a remote client machine
d. None of the above
Answer: B

41

Chapter 14: Relational Database Management Systems


True or False:
14.1. An attribute contains entities.
Answer: F
14.2. An output report must have the same fields and in the same order as the database table.
Answer: F
14.3. A query uses conditional expressions to select data.
Answer: T
14.4. Queries build a new table by selecting all or part of the records and/or fields.
Answer: T
14.5. Forms allow the user to see all of the data for one record at one time on the screen.
Answer: T
14.6. Output reports may be viewed on the monitor or be printed on a printer.
Answer: T
14.7. Normalizing tables enables to developer to efficiently divide data into related tables.
Answer: T
14.8 AnEntityRelationModelisamodelofthedatathatprovidesthedesignerwiththreemain

semanticconcepts:entities,relationships,andattributes.
Answer:T
14.9 Theschemaofyourdatabaseshowstherelationshipsamongthetables.

Answer:T
Multiple Choice:
14.10 A Table is a:
a. An group of related records or entities
b. A spreadsheet
c. A place where the computer is stored
d. All of the above
Answer: A
14.11 A Field is used to:
a. Play baseball
b. Store data of a particular type
c. Is always a primary key
d. All of the above
Answer: B
14.12 Primary Keys:
a. Are used in database tables
b. Are a field
c. Is a unique value
d. All of the above
Answer: D

42

14.13. The schema:


a. Is how the fields are set up in the record.
b. Is how the records are organized for output.
c. Shows how the tables are related.
d. Shows all of the data in a record.
Answer: C
14.14. A key that is a relational field to another table is:
a. a primary key
b. a secondary key
c. a foreign key
d. a relational key
Answer: C
14.15. In the design of output reports
a. The number of columns must be kept at a minimum.
b. The maximum number of characters on a line must be less than the number of characters that your
printer can print across a page.
c. Must also contain any desired summary lines, groupings, and headings.
d. b and c.
e. None of the above.
Answer: D
14.16. First normalization takes care of:
a. the insertion anomaly
b. the update anomaly
c. the deletion anomaly
d. the schema
Answer: A
14.17 Normalization:
a. divides data into relational tables.
b. increases productivity.
c. creates foreign keys.
d. none of the above.
e. a, b, and c.
Answer: E
14.18. Queries may use which of the following to develop the logical expression.
a. Relational operators.
b. Logical operators.
c. Mathematical operators.
d. All of the above.
e. a and b.
Answer: D

43

Unit 5: Object Oriented Programming


Chapter 15: Concepts of Object Oriented Programming
True or False:
15.1. Object oriented programming is the same as procedural programming.
Answer: F
15.2. A GUI uses icons to allow for easy interaction between the user and the computer.
Answer: T
15.3. An event-driven program reacts to something happening in the computer, in response to a direction
from the user.
Answer: T
15.4. An object is an instruction in the computer.
Answer: F
15.5. Navigational tools allow the user to interact with the computer.
Answer: T
15.6. An event is when something happens in the computer.
Answer: T
15.7. Developing the various functions is developing a module in a procedural language.
Answer: T
15.8. A class is a collection of objects.
Answer: T
15.9. Object oriented programming lends itself to programming today because of the GUI.
Answer: T
15.10. Interactivity is developed to move from one screen to another.
Answer: T
Multiple Choice:
15.11. Object oriented programming:
a. Has modules just like procedural programming.
b. Does not have to process all modules.
c. Looks at parts of the problem in terms of data, its properties, its responsibilities and how they interact
with other parts.
d. All of the above.
e. None of the above.
Answer: D
15.12. An event in a computer may be:
a. A logical decision.
b. An instruction.
c. An interaction such as mouse-down, key-down, etc.
d. The opening of a table.
Answer: C

44

15.13. A GUI:
a. Is a Graphic User Interface.
b. Can only use a pointing device to activate it.
c. Uses only icons for interaction.
d. All of the above.
Answer: A
15.14. Interactivity:
a. Is the interaction between the computer parts and is not seen by the user.
b. Requires the user to do something in order for the computer to react, such as click a button.
c. Is only used in procedural programming.
d. Is only accomplished through the use of a mouse.
Answer: B
15.15. A class:
a. Is a group of objects.
b. Has a set of properties associated with it.
c. Is the same thing as a single variable.
d. Has no relationship with other classes, sub-classes, or super-classes.
Answer: B
2.16. An example of a navigational tool is:
a. Mouse up or down.
b. Button on the screen.
c. A key that is pressed.
d. All of the above.
e. None of the above.
Answer: B
15.17. In a solution developed using object-oriented programming:
a. There may be some modules that are never executed.
b. All modules must be executed.
c. Different modules may be executed every time the solution is processed.
d. a and c.
Answer: D.
15.18. Once a class is defined:
a. It may be referenced as a single variable.
b. A sub class may be defined.
c. An object may be defined.
d. All of the above.
e. None of the above.
Answer: D
15.19. Functions:
a. Are basically the same as modules.
b. Can be executed at any time during the execution of a program.
c. Are only executed during the processing of an event.
d. All of the above.
e. a and b.
f. None of the above.
Answer: E

45

15.20. Interactivity requires:


a. Events.
b. Navigational tools.
c. Functions.
d. All of the above.
e. None of the above.
Answer: D
15.21. An example of a class might be:
a. A single transaction in a bank.
b. Paintings in a museum.
c. One client.
d. All of the above.
e. None of the above.
Answer: B
15.22. An example of an object in an object-oriented program might be:
a. A single transaction in a bank.
b. Paintings in a museum.
c. A group of clients.
d. All of the above.
e. None of the above.
Answer: A
15.23. An example of a sub-class might be:
a. A single transaction in a bank.
b. Paintings in a museum.
c. Books by a single author.
d. All of the above.
e. None of the above.
Answer: C
15.24. An example of an object in an event driven object-oriented programming language might be:
a. A book.
b. A graphic on the screen.
c. A group of clients.
d. All of the above.
e. None of the above.
Answer: B
15.25. Properties of an event-driven object-oriented program object might include:
a. Color.
b. Name.
c. Size.
d. All of the above.
e. a and c.
Answer: D
15.26 The difference between an Instance Method and a Static Method is:
a. A Static Method does not have to be created whereas in Instance Method does.
b. A Static Method uses less memory than a Instance Method
c. A Static Method is a subset of an Instance Method
d. All of the above
Answer: A

46

Chapter 16: Object Oriented Program Design


True or False:
16.1. The instructions within a module in an object-oriented program are procedural.
Answer: T
16.2. The environment is not an important consideration when developing an event driven program.
Answer: F
16.3. TherearethreetypesofUMLdiagrammingclassifications,behavioral,interactionand

structural:
Answer: T

16.4. Usecasediagramsdescribehowasystemfunctionsfromtheusersstandpoint.
Answer: T
16.5. It is important to design the interaction before you develop the modules or scripts.
Answer: T
16.6. The screen design is unimportant as long as all of the information and data is there.
Answer: F
16.7. UML is a new method for storing data in a database
Answer: F
16.8. Class Diagrams determine how the user interface interacts.
Answer: F
16.9. Navigation design should be deigned with the developer and program design in mind.
Answer: F
16.10. Storyboards are optional in the design of an event-driven object-oriented program.
Answer: F
Multiple Choice:
16.11. A class diagram:
a. Is a list of classes used in the program.
b. Is a list of events used in the program.
c. Shows the classes and how they are processed.
d. Shows the data structure, attributes and methods of a class.
Answer: D
16.12. The audience:
a. Should be incorporate into the design using Use Case Diagrams.
b. Is not important.
c. Should be considered but should not be an important aspect in the design of the project.
d. None of the above.
Answer: A

47

16.13. The storyboards show:


a. The story line of a project.
b. The graphics on each screen.
c. The interaction and navigational tools on each screen.
d. All of the above.
Answer: D
16.14. In an event driven program, each object:
a. Definition is unimportant.
b. Must have a script attached to it.
c. Should be defined as to what it is, where it is found, and how it is used.
d. Should only be defined if it is a graphic.
Answer: C
16.15. An event driven interactivity chart:
a. Is not important to the development of the project.
b. Should only be used if the project has very complicated interaction.
c. Should always be developed to show how the screens interact with each other.
d. Is only used by the user after the project is completed.
Answer: C
16.16. The first step in the design of an object-oriented program is to:
a. Determine the input.
b. Determine the output.
c. Determinetherequirementsoftheprogramintermsofinput,output,andneededdata
requirements.
d. All of the above.
e. None of the above.
Answer: C
16.17. When determining the input and output requirements for the design of an object oriented program
a. The classes of data should be developed at the same time.
b. Format of the data should be developed at the same time.
c. The output screen should be developed at the same time.
d. All of the above.
e. None of the above.
Answer: B
16.18. When determining the classes of data for the design of an object oriented program
a. The properties should be determined at the same time.
b. The objects should be determined at the same time.
c. The functions of the classes should be determined at the same time.
d. All of the above.
e. a and c.
f. None of the above.
Answer: E
16.19. The interactivity for the design of an object oriented program
a. Should include the interactivity between functions within the classes.
b. Should include the interactivity between classes.
c. Should include the interactivity between screens.
d. All of the above.
e. a and b.
f. None of the above.
Answer: D

48

16.20. Interface design rule(s) include:


a. Keep it simple.
b. Be consistent.
c. Be realistic.
d. All of the above.
e. None of the above.
f. a and b.
Answer: F
16.21. The element(s) of a screen design include:
a. Background.
b. Navigational tools.
c. Sound
d. Video.
e. All of the above.
Answer: E
16.22. In the design of an event-driven object oriented application
a. The audience should be considered.
b. The environment should be considered.
c. The terminology should be considered.
d. All of the above.
e. None of the above.
Answer: D
16.23. A storyboard
a. Defines the objects.
b. Defines the order of development of each screen.
c. Defines what is placed on each screen.
d. a and b.
e. b and c.
f. All of the above.
Answer: E.
16.24. When defining an object:
a. The navigational tools associated with the object should be defined.
b. The events associated with the object should be defined.
c. The name of the object should be defined.
d. All of the above.
e. None of the above.
Answer: C.
16.25. Interactivity occurs between
a. The scripts.
b. The objects.
c. The navigational tools.
d. The events.
e. All of the above.
f. a and b.
Answer: F

49

Unit 6: Introduction to Game Development


Chapter 17: Introduction to Concepts of Game Development Using Object Oriented
Programming
True and false:
17.1. It is not important to make a plan before starting the development stage.
Answer: F
17.2. Games need a story line.
Answer: T
17.3. Games need a goal
Answer T
17.4. Users do not expect rewards when playing a game.
Answer: F
17.5. Objects are the entities of a game>
Answer: T
17.6. Sprites are used as background images and music in a game.
Answer: F
17.7. Scripts are the set of instructions which are given to an object or a sprite.
Answer: T
17.8. It takes very little time to develop a game because of the new languages that are used.
Answer: F
17.9. Games use multiple types of input devices.
Answer: T
17.10. Games use only the keyboard to direct the flow of the instructions.
Answer: F
Multiple Choice:
17.11. Games use the following as input devices:
a. Joysticks
b. Keyboard
c. Mouse
d, All of the above
Answer: D
17.12. When planning a game you should keep in mind:
a. The players
b. The developers
c. The sellers
d. None of the above
Answer: A

50

17.13. Games:
a. Need a story line
b. Need resources
c. Should have a goal
d. Should have a reward
e. All of the above
Answer: E
17.14. Resources of a game include:
a. Objects
b. An environment
c. Sprites
d. Backgrounds
e. All of the above
Answer: E.
17.15. Events are:
a. Part of the environment
b. Sounds
c. The interaction between the player and the game
d. Part of the script
17.16. Timelines:
a. Are part of the scripts
b. Guide objects
c. Specify when something happens
d. None of the above
Answer: C
17.18. Sounds:
a. Are expected by players
b. Are used in the background
c. Are used when something happens
d. All of the above
e. None of the above
Answer: D

51

Chapter 18: Introduction to Assembly Language


True and false:
18.1. Assembly language is used to speed up games.
Answer: T
18.2. Assembly language and machine language are the same.
Answer: F
18.3. Assembly language is a direct translation from machine language.
Answer: T
18.4. Assembly language uses the accumulator for calculations.
Answer: T
18.5. Registers are used for temporary storage.
Answer: T
18.6. All assembly languages are the same.
Answer: F
18.7. Assembly language uses three letters to indicate an instruction.
Answer: T
18.8. Compilers are faster than assembly language.
Answer: F
18.9. Assembly language is one step up from machine language.
Answer: T
18.10. A programmer using assembly language has more control of the program than when using a high
level language.
Answer: T
Multiple Choice:
18.11. An example of an assembly language instruction is:
a. Divide
b. DIV X
c. Divx
d. All of the above
e. None of the above
Answer: B
18.12. The accumulator is used to:
a. Store input data
b. Temporarily store intermediate results
c. Permanently store instructions
d. None of the above
e. a, b, and c
Answer: D

52

18.13. Registers are used to:


a. Store input data
b. Temporarily store intermediate results
c. Permanently store instructions
d. None of the above
e. a, b, and c
Answer: B

53

Unit 7: File Processing


Chapter 19: Sequential-Access File Applications
True and False
19.1. A page break is a type of control break.
Answer: T
19.2. A null file is a file with no records.
Answer: F
19.3. The line counter is used to count all of the lines printed in the entire output report.
Answer: F
19.4. An exception report is an output report that lists the bad records.
Answer: T
19.5. Error handling is accomplished through the use of the decision logic structure during the input and
calculation of data.
Answer: F
19.6. Line counters designate where a page break should take place.
Answer: T
19.7. A control break stops the normal processing of records and processes other modules.
Answer: T
19.8. A control field(s) are needed to designate where the control break takes place.
Answer: T
19.9. Indicators can be used to designate page breaks.
Answer: F
19.10. Error handling is optional since there are very few input errors.
Answer: F
Multiple Choice
19.11. The output report should be designed:
a. To facilitate the printing of relevant data.
b. With the user in mind.
c. So that the information can be gleaned as fast as possible by the user.
d. All of the above.
Answer: B
19.12. A control break:
a. Breaks the processing of the records in a file and stops the processing whenever an error is found.
b. Breaks the processing of the records to update a record.
c. Breaks the processing of the records to write a summary line.
d. Breaks the processing of the records when the user requests information.
Answer: D

54

19.13. When a page break takes place:


a. The line counter is incremented.
b. The page counter is set to zero.
c. The page is ejected, and the headings are written at the top of the next page.
d. The control break is reset.
Answer: B
19.14. Multiple control breaks:
a. Breaks the processing for multiple errors.
b. Uses more than one field to process the control breaks to print different types of summary lines.
c. Is a type of page break.
d. Ejects a page at each break.
Answer: D
19.15. During the processing of each record:
a. Before the record is processed the program checks to see if a control break needs to take place.
b. The requirements of the summary line are calculated.
c. Before the record is processed the program checks to see is page break is needed.
d. The line number is incremented for every line printed.
e. All of the above.
Answer: C
19.16. Line counters are used to
a. Know when to eject a page.
b. Know when to print headings.
c. Know when to start a new paragraph.
d. All of the above.
e. a and b.
Answer: E
19.17. Output reports should be designed
a. With the developer in mind.
b. With the user in mind.
c. As fast a possible, without consideration of where data really needs to be place.
d. All of the above.
Answer: B
19.18. To output subtotals:
a. Page breaks are used.
b. Control breaks are used.
c. Line counters are used.
d. Column headings must be printed.
Answer: B
19.19. Control breaks are executed using:
a. Line counters.
b. Multiple control breaks.
c. A control field.
d. A null record.
Answer: C

55

19.20. The control break is executed when


a. The line counter reaches the maximum number of lines on a page.
b. The value of the control field changes.
c. A null record is found.
d. Through the use of an indicator.
Answer: B
19.21. After all records have been processed,
a. A page break must take place.
b. All control break modules must be executed to print final sub totals.
c. Over all totals must be printed.
d. The file must be closed.
e. All of the above.
f. b and c and d.
Answer: F
19.22. When using multiple control breaks,
a. All control break modules must be executed when one control field changes.
b. Only the modules associated with the control field that changed are executed.
c. Modules associated with the control field along with any modules that have control fields that are
subordinate to that control field are executed.
d. None of the above.
Answer: C
19.23. Page breaks are executed
a. From the control modules.
b. From the print module.
c. From any module.
d. None of the above.
Answer: B
19.24. Error handling
a. Finds errors in the records.
b. Is executed each time a record is read into the computer.
c. Produces an error report.
d. All of the above.
e. None of the above.
Answer: D
19.25. When a null file occurs:
a. No records should be processed.
b. The file should be closed and reopened again.
c. The program should process at least one record.
d. None of the above.
Answer: A

56

Chapter 20: Sequential File Updating


True and False
20.1. When adding a record to a sequential file, it is added to end of the file.
Answer: F
20.2. The master file holds all of the data to be updated.
Answer: T
20.3. The activity file holds all of the data to update the master file.
Answer: T
20.4. Backup files are not important to keep.
Answer: F
20.5. To update a sequential file, each record must be read sequentially and check to see if it needs
updating.
Answer: T
20.6. Updating a file means to only add new records.
Answer: F
20.7. A sequential file is updated through the use of interactive processing.
Answer: F
20.8. In order to update a file, it must be created first and have records added.
Answer: F
20.9. A systems flowchart show the flow of data between hardware units and software.
Answer: T
20.10. Records may be added, deleted, or changed during the processing of updating a file.
Answer: T
Multiple Choice
20.11. The transaction file:
a. Is listed in random order.
b. Is listed in order of the primary key of the master file.
c. Is listed in order of the first field of the master file.
d. None of the above.
Answer: B
20.12. An exception report from the sequential update program:
a. Lists all of the changed records in the master file.
b. Lists all of the errors found in updating the master file.
c. Lists all of the records in the transaction file.
d. Lists all of the records in the activity file.
Answer: B

57

20.13. When updating a sequential file:


a. The transaction primary key is compared to the new master primary key.
b. The activity primary key is compared to the old master primary key.
c. The transaction primary key is compared to the old master primary key.
d. None of the above.
Answer: C
20.14. The transaction code:
a. Is used to find the correct record in the master file.
b. Indicates the type of update that is needed: adding a record, changing a record, or deleting a record.
c. Is used to create the exception report.
d. All of the above.
Answer: B
20.15. The backup file:
a. Is made from the old master file.
b. Is important to keep.
c. Does not include the updates to the master file.
d. All of the above.
Answer: D
20.16. During the update of a file
a. A new master file is created.
b. The old master file is destroyed.
c. The transaction file is destroyed.
d. The backup file is created from the new master file.
e. All of the above.
f. a and d.
Answer: A
20.17. During the process of updating a sequential file, the processing stops when:
a. The EOF is reached on the transaction file.
b. The EOF is reached on the old Master file.
c. The EOF is reached on the new Master file.
d. a and b.
e. None of the above.
Answer: E
20.18. Errors are written to the error report when:
a. The transaction file finishes before the master file.
b. The master file finishes before the transaction file.
c. A record is added that has a duplicate to an existing record.
d. All of the above.
e. None of the above.
Answer: C
20.19. When questions about a record come about, the file that is most import to check is:
a. Transaction file.
b. Activity file.
c. Old master file.
d. Backup file.
e. None of the above.
Answer: B

58

20.20. After the completion processing of the program to update a sequential file,
a. The old master file is the same as the new master file.
b. The backup file is the same as the new master file.
c. The old master file is the same as the backup file.
d. None of the above.
Answer: A
20.21. Updating a file uses a process called
a. Interactive processing.
b. Batch processing.
c. Alternative processing.
d. Change processing.
Answer: B
20.22. When deleting a record, the record
a. May be retained in the master file, but marked as deleted.
b. May be destroyed.
c. May be placed in an activity file.
d. a and c.
e. None of the above.
Answer: D
20.23. A record that is added to the file
a. Is placed at the end of the file.
b. Is placed in order.
c. Is placed at the beginning of the file.
d. None of the above.
Answer: B
20.24. In the process of updating a file
a. The file is kept in order of the primary key.
b. The file order is destroyed.
c. The file is kept in order of the secondary key.
d. The file is kept in order of a foreign key.
Answer: A
20.25. When changing the data in a record, the corrected record
a. Is placed back in order of the primary key.
b. Is placed at the end of the file.
c. Is placed in the activity file.
d. a and c.
e. None of the above.
Answer: D

59

Vous aimerez peut-être aussi