Refactoring
Refactoring
Question: What are the entities that can be refactored at the design level?
Answer: a) Software architecture, class diagram, statechart diagram, and activity
diagrams
Options:
a) Software architecture, class diagram, statechart diagram, and activity diagrams
b) Software architecture, class diagram, and global control flow
c) Class diagram, statechart diagram, and database schemas
d) Software architecture, activity diagrams, and database schemas
Question: What happens when a mutually exclusive refactoring has already been
applied?
Answer: b) It cannot be applied anymore
Options:
a) It can still be applied
b) It cannot be applied anymore
c) It becomes applicable to a different set of refactorings
d) It becomes conflicting with other refactorings
Question: What is one way to ensure that the sequence(s) of method calls are
preserved in the refactored program?
Answer: d) Verification of preservation of call sequence
Options:
a) Critical pair analysis
b) Sequential dependency analysis
c) Testing
d) Verification of preservation of call sequence
Question: What are the three kinds of assertions mentioned in the passage?
Answer: a) Invariants, preconditions, and postconditions
Options:
a) Invariants, preconditions, and postconditions
b) Metrics, cohesion, and coupling
c) Graph transformation, software metrics, and refactoring
d) Programmers, assumptions, and Boolean expressions
Question: What is the advantage of refactoring the code segment mentioned in the
passage?
Answer: a) It reduces the number of parameters passed to methods.
Options:
a) It reduces the number of parameters passed to methods.
b) It increases the efficiency of the code.
c) It improves the readability of the code.
d) It eliminates errors in the code.
Question: Which of the following tools can help programmers better understand the
code?
Answer: d) All of the above
Options:
a) Tracing of source code
b) Animation of algorithms
c) Cross referencing of global variables
d) All of the above
Question: What are the two factors taken into account while applying clustering?
Answer: a) Similarity metrics and clustering algorithm
Options:
a) Similarity metrics and clustering algorithm
b) Distance measures and association coefficients
c) Top-down and bottom-up approaches
d) System level and entity level remodularization
Question: What are the two kinds of program slicing mentioned in the passage?
Answer: a) Forward slicing and backward slicing
Options:
a) Forward slicing and backward slicing
b) Cohesive slicing and decomposed slicing
c) Extracted slicing and restructuring slicing
d) Large slicing and small slicing