Which is not a step in the Problem

advertisement
1. Which is not a step in the Problem-Solving phase?
A. Analysis and Specification
B. Translate the algorithm (the general solution) into a programming language
C. Specify the required data types and the logical sequences of steps that solve the
problem
D. Follow the steps exactly to see if the solution really does solve the problem
2. Which is not a step in the Implementation phase?
A. Testing
B. Translate the algorithm (the general solution) into a programming language
C. Specify the required data types and the logical sequences of steps that solve the
problem
D. Have the computer follow the instructions. Then manually check the results. If you
find errors, analyze the program and the algorithm to determine the source of the
errors, and then make corrections
3. Which is a step in the Maintenance phase?
A. Modify the program to meet changing requirements or to correct any errors that show
up while using it
B. Specify the required data types and the logical sequences of steps that solve the
problem
C. Translate the algorithm (the general solution) into a programming language
D. Develope a general solution for each piece called an algorithm
4. Please choose the correct order of following steps relating to the program development
S1-Document & maintain the program
S2-Define the problem
S3-Coding
S4-Outline the solution
A.
B.
C.
D.
S2->S1->S3->S4
S1->S2->S3->S4
S2->S4->S3->S1
S3->S2->S4->S1
5. Which item is not a recommendaton when writing pseudo codes?
A. Each instruction/step is written on a separate line
B. Keywords and indentation are used to signify particular control structures
C. Each set of instructions is written from top to bottom, with only one entry and one exit
D. Try to keep each instruction/step as short as possible
6. What is an example of the information-receiving operation of a computer?
A.
B.
C.
D.
Read (information from a file)
Write (information to a file)
Use actual mathematical symbols or the words for the symbols (+, -, *, /)
Giving data an initial value: Initialize, Set
7.
Please select one item which is not a guide when writing pseudo code
A. Keywords are written in CAPITALS
B. Structural elements might come separately
C. Indenting is used to show structure in the algorithm
D. The names of subprograms are underlined
8. What can we do with the Circle symbol when drawing the flowchart to represent the
algorithm?
A. Use it to represent an event which occurs automatically. Such an event will trigger a
subsequent action, for example `receive telephone call’, or describe a new state of
affairs.
B. Use it to represent an event which is controlled within the process. Typically this will be a
step or action which is taken. In most flowcharts this will be the most frequently used
symbol
C. Use it to represent a decision point in the process. Typically, the statement in the symbol
will require a `yes' or `no' response and branch to different parts of the flowchart
accordingly
D. Use it to represent a point at which the flowchart connects with another process. The
name or reference for the other process should appear within the symbol
9. Please select the best variable name for an employee's last name
A. empLastName
B. lastNameOfTheEmployeeInQuestion.
C. emplastname
D. empLstNm
10. Which structure theorem is used n a computer program or algorithm
to determine which particular step or set of steps is to be executed?
A.
B.
C.
D.
Sequence
Selection
Repetition
Subprogram
11. What is incorrect function of the parameter using in communicating between modules?
A. To pass information from a calling module to a subordinate module
B. To pass information from a subordinate module to its calling module
C. To fulfil a two-way communication role
D. To store the reference data
12. In below definitions on the global data, which one is incorrect?
A. Data that can be used by all the modules in a program
B. Every module in the program can access and change data
C. Variables which are defined within the sub module
D. Lifetime of a global variable spans the execution of the whole program
13. Please choose correct definition of the module parameters
A. Reference parameters pass a copy of the value of a parameter from one module to
another
B. Value parameter pass the memory address of a parameter from one module to another
C. Formal parameters are the one that appear when a submodule is defined
D. Variables and expressions that are passed to a submodule in a particular call are called
formal parameters
14. The phrase "Two loops, one nested in the other" presents which kind of
cohesion/coupling?
A. Low Coupling
B. High Coupling
C. Low Cohesion
D. High Cohesion
15. What type of coupling when “One module refers to part of another directly”?
A. Content Coupling
B. Common Coupling
C. Control Coupling
D. Stamp Coupling
16. If it’s hard to reuse calling module without including the called one, then what type of
coupling has been used?
A. Content Coupling
B. Common Coupling
C. Control Coupling
D. Stamp Coupling
17. What type of coupling when “Both modules share the same data”?
A. Content Coupling
B. Common Coupling
C. Control Coupling
D. Stamp Coupling
18. What type of coupling when “One module controls decisions made by other module.”?
A. Content Coupling
B. Common Coupling
C. Control Coupling
D. Stamp Coupling
19. What type of coupling if “Modules pass data structures but only use part of them.”?
A. Content Coupling
B. Common Coupling
C. Control Coupling
D. Stamp Coupling
20. What type of coupling when “Modules communicate only through data which is used”?
A. Common Coupling
B. Control Coupling
C. Stamp Coupling
D. Data Coupling
21. A module “Calculator” is designed to perform math’s operations containing following
actions: (multiply numbers, print to output stream result value, search numbers in string
result). What is the characteristic of this module?
A. Low Coupling
B. High Coupling
C. Low Cohesion
D. High Cohesion
22. A module is designed with operation “init()”, that is to call and execute a series of also
“init()” of many other modules. What is the characteristic of this module?
A. Low Coupling
B. High Coupling
C. Low Cohesion
D. High Cohesion
23. “To perform exactly one action or achieve a single goal” is “Low Cohesion” or “High
Cohesion”?
A. Low Coupling
B. High Coupling
C. Low Cohesion
D. High Cohesion
24. What type of cohesion if a module whose elements perform similar activities and in
which the activities to be executed are chosen from outside the module?
A. Logical Cohesion
B. Temporal Cohesion
C. Procedural Cohesion
D. Communicational Cohesion
25. What type of cohesion if a module whose elements are functions that are related in
time?
A. Logical Cohesion
B. Temporal Cohesion
C. Sequential Cohesion
D. Functional Cohesion
26. What type of cohesion if a module whose elements are involved in different activities, but
the activities are sequential?
A. Functional Cohesion
B. Temporal Cohesion
C. Procedural Cohesion
D. Communicational Cohesion
27. What type of cohesion if a module whose elements perform different functions, but each
function references the same input information or output?
A. Communicational Cohesion
B. Sequential Cohesion
C. Functional Cohesion
D. Temporal Cohesion
28. What type of cohesion if a module whose functions are related such that output data
from one function serves as input data to the next function?
A. Communicational Cohesion
B. Functional Cohesion
C. Procedural Cohesion
D. Sequential Cohesion
29. Which pair refers to a good design?
A. Low Coupling & Low Cohesion
B. Low Coupling & High Cohesion
C. High Coupling & Low Cohesion
D. High Coupling & High Cohesion
Download