كل أسئلة الحارثي من أول كويز للأخير مع الميد PDF

Document Details

NiftySaturn

Uploaded by NiftySaturn

Tags

software evolution software maintenance software engineering computer science

Summary

هذه الورقة تحتوي على أسئلة من كويزات لطلاب مجموعة 1 و 2 بالإضافة للميد، و تتضمن أسئلة حول الهندسة والهندسة الكهربائية، و البرمجيات من مختلف جوانبها.

Full Transcript

#Level 8, #Level 8/CM&C All midterms of Abu-Harutha (only for girls) Group 1 1. What is the goal of Forward Engineering? a) Moving from implementation to abstraction b) Decomposing the system for reusability c) Moving from the abstract...

#Level 8, #Level 8/CM&C All midterms of Abu-Harutha (only for girls) Group 1 1. What is the goal of Forward Engineering? a) Moving from implementation to abstraction b) Decomposing the system for reusability c) Moving from the abstraction level to the implementation (detailed level) d) Refining the system for optimization 2. What does forward engineering entail? a) Moving from the implementation level to abstraction b) Moving from the abstraction level to the implementation (detailed level) c) Decomposing systems into smaller components d) Simplifying complex systems into general models 3. Which approach is used when you want to gradually change at a time? a) Big Bang engineering b) Incremental Engineering c) Iterative engineering d) Evolutionary engineering 4. What is the purpose of reverse engineering? a) Redesigning the system architecture b) Decomposing the system to get a reusable component c) Optimizing the system for performance d) Rehosting the system without changes 5. Why is Scalability in the SW evolution Visualization important? a) To provide a detailed breakdown of components b) To improve abstraction and simplification c) To provide a good representation of a large system d) To ensure minimal visual complexity 6. What is not one of the objectives of reengineering? a) Improving maintainability b) Migrating to a new technology c) Improving hardware integration d) Preparing for functional enhancement 7. What is the reverse of abstraction? a) Alteration b) Refinement c) Decomposition d) Simplification Quizzes 8. 20. What is the focus of the "Evolution" phase in the Staged Model for CSS? a) Reducing costs b) Creating new architectures c) Migration planning d) Implementation of major changes 9. Which maintenance type involves restructuring code to improve readability? a) Preventive b) Corrective c) Adaptive d) Perfective 10. What is an example of adaptive maintenance? a) Reengineering code for better performance b) Improving user interface design c) Changing the system to support new hardware configurations d) Correcting software bugs 11. Which activity is included in post-delivery software maintenance according to ISO/IEC 14764? a) Conducting market research b) Operating a help desk c) Planning for operations d) Designing new software 12. What is the primary purpose of corrective maintenance in software systems? a) To adapt to new data environments b) To correct processing and performance failures c) To prevent future problems d) To improve user experience and efficiency 13. What is the focus of the process improvement approach in software evolution? a) Understanding why changes occur b) Developing better methods and tools for managing evolution c) Predicting future software trends d) Explaining the effects of software evolution 14. How does version control ensure accuracy in development? a) By managing changes through branching b) By eliminating the need for workspaces c) By providing full automation d) By automatically testing builds 15. What does a “functional configuration audit” check? a) Alignment with system design b) Adherence to coding standards c) Compliance with user requirements d) Reduction of operational risks 16. Which task occurs during the “Process Implementation” activity in ISO/IEC 14764? a) Perform risk analysis b) Develop user training materials c) Create acceptance test cases d) Establish configuration management 17. Which phase in the IEEE/EIA 1219 process focuses on integrating code changes? a) Delivery b) Problem Identification c) Analysis d) Implementation 18. How does the Iterative Enhancement Model propagate changes? a) Directly through the system b) From requirements to code c) From test data to analysis d) From code to requirements 19. Which model in software maintenance is characterized by quick changes made directly to the code without prior investigation? " ‫كان جايب المصطلح وانت تختارين التعريف‬ a) Change Mini-Cycle Model b) Full Reuse Model c) Quick Fix Model d) Iterative Enhancement Model 20. Which law of software evolution emphasizes the need for continuous adaptation of E-type programs? a) Increasing complexity b) Self-regulation c) Conservation of organizational stability d) Continuing change Midterm (group 2) 1. What is the main concern of the eighth law of software evolution? a) Conservation of familiarity b) Declining quality c) Continuing growth d) Feedback systems in evolution processes 2. What is the primary difference between maintenance and evolution of software systems? a) Evolution deals with cost reduction b) Maintenance preserves software from decline c) Maintenance involves adding new features d) Evolution focuses on correcting errors 3. Which of the following is an example of corrective maintenance? a) Enhancing the readability of program outputs b) Correcting a program that produces incorrect results c) Updating software to prevent future failures d) Modifying software for new hardware compatibility 4. What is the objective of delivery in the IEEE/EIA 1219 process? a) Document all maintenance changes b) Ensure the system is installed and operational for users c) Finalize test automation scripts d) Validate compliance with configuration management 5. What is the primary goal of preventive maintenance in software systems? a) Adapting to new user requirements b) Enhancing user experience c) Preventing future software failures d) Correcting existing errors 6. Which activity is included in post-delivery software maintenance according to ISO/IEC 14764? a) Conducting market research b) Designing new software c) Operating a help desk d) Planning for operations 7. What is the primary focus during the Servicing phase in the Staged Model for CSS? a) Simplifying the architecture b) Replacing the system c) Performing maintenance tasks d) Developing a new baseline 8. How does ISO/IEC 14764 define the retirement phase? a) Verifying compliance with user needs b) Developing a new baseline c) Phasing out the old system through data migration d) Improving system efficiency 9. Which maintenance type involves restructuring code to improve readability? a) Corrective b) Preventive c) Adaptive d) Perfective 10. Which phase in the reengineering process focuses on modifying the operational system into the target system? a) Analysis and planning b) Redocumentation c) Renovation d) Target system testing 11. Which characteristic of software maintenance is not typical of software development? a) Must align with constraints of an operational system b) Availability of test data for regression testing c) Requires a longer time frame for activities d) Modifications must be compatible with existing architecture 12. Which model in software maintenance is characterized by quick changes made directly to the code without prior investigation? a) Iterative Enhancement Model b) Quick Fix Model c) Full Reuse Model d) Change Mini-Cycle Model 13. What is the focus of the "Evolution" phase in the Staged Model for CSS? a) Reducing costs b) Creating new architectures c) Migration planning d) Implementation of major changes 14. What is redocumentation in software reengineering? a) Updating user manuals b) Automatically generating new documentation from existing code c) Writing test case documentation d) Refining the current software documentation 15. What does forward engineering entail? a) Reusing existing system components b) Decompiling object code to a high-level language c) Translating high-level code into object code d) Moving from high abstraction to detailed implementation 16. Which visualization property ensures representations are scalable? a) Distinctive appearance b) Individuality c) Scalability of visual complexity d) Suitability for automation 17. Why are configuration audits performed? a) To validate migration steps b) To eliminate regression tests c) To standardize branching strategies d) To ensure changes align with project goals 18. Program slicing is used to determine what? a) Impacted program components b) Runtime performance c) Compilation errors d) User feedback 19. The SCORE/RM model includes which key element? )‫(قال بيحسب االجابتين صح‬ a) Object-oriented programming b) Manual documentation c) Encapsulation d) System testing 20. In reverse engineering, what is a call graph used for? a) Improving execution speed b) Representing calling relationships between procedures c) Representing program control flow d) Visualizing variable dependencies Chapter3_Quiz 1. Which characteristic of software maintenance is not typical of software development? a. Requires a longer time frame for activities b. Modifications must be compatible with existing architecture c. Availability of test data for regression testing d. Must align with constraints of an operational system 2. How does ISO/IEC 14764 define the retirement phase? a. Verifying compliance with user needs b. Phasing out the old system through data migration and training c. Automating build processes d. Developing a new baseline 3. What does the “sandbox” functionality in SCM enable? a. Edit files in isolation without affecting the repository b. Automate deployment pipelines c. Merge multiple branches without conflict d. Automate test case generation 4. Which phase in IEEE/EIA 1219 involves acceptance testing? a. Analysis b. Problem Identification c. System Test d. Delivery 5. How does version control ensure accuracy in development? a. By managing changes through branching b. By eliminating the need for workspaces c. By providing full automation d. By automatically testing builds 6. Which type of audit confirms user requirements are met? a. Regression testing audit b. Baseline verification audit c. Functional configuration audit d. Physical configuration audit 7. What is the main focus of “Migration” in software maintenance? a. Reducing version conflicts b. Building new functionality c. Transitioning to a new environment d. System testing 8. What does workspace isolation enable developers to do? a. Work on changes without impacting others b. Automate branching and merging c. Simplify testing cycles d. Reduce versioning errors 9. Which activity is part of the migration phase? a. Designing training materials b. Identifying actions required for transitioning to a new system c. Reviewing baseline integrity d. Creating user acceptance tests 10.What are the two discrete phases of the traditional software development life cycle (SDLC)? a. Development and Testing b. Development and Maintenance c. Analysis and Design d. Maintenance and Retirement 11.What does SCM version control track? a. Cost of changes b. Uniqueness of configuration items c. User feedback d. Training requirements 12.What is the “branch” in SCM? a. User request repository b. A separate line of development c. Archived configuration baseline d. Physical server location 13.In the Change Mini-Cycle model, which of the following is not a key feature? a. Alteration of the software system b. Addressing incorrect implementations c. Introduction of new requirements d. Direct testing of new modules 14.Which phase of ISO/IEC 14764 ensures modifications meet organizational goals? a. Process Implementation b. System Test c. Maintenance Review and Acceptance d. Migration 15.Why are configuration audits performed? a. To standardize branching strategies b. To ensure changes align with project goals c. To validate migration steps d. To eliminate regression tests 16.What is the main focus of regression testing? a. Create new configurations b. Automate build scripts c. Ensure unchanged functionality remains intact d. Test user training materials 17.What is the purpose of change request workflows in SCM? a. Automate test case creation b. Track and approve modifications systematically c. Simplify version control mechanisms d. Automate software deployment 18.In the full reuse model, which of the following is not a primary activity? a. Understanding the identified system components b. Modifying old system components to support new requirements c. Integrating modified components to form a new system d. Replacing the old system entirely with new components 19.How does ISO/IEC 14764 define problem and modification analysis? a. Identifying required changes and impact b. Building a migration plan c. Reviewing user requests d. Automating version control 20.What is the focus of the “Evolution” phase in the Staged Model for CSS? a. Reducing costs b. Creating new architectures c. Migration planning d. Implementation of major changes 21.What is the goal of “status accounting” in SCM? a. Align user expectations with system features b. Simplify project delivery timelines c. Automate deployment processes d. Document configuration and changes for stakeholders 22.What does a “functional configuration audit” check? a. Alignment with system design b. Adherence to coding standards c. Compliance with user requirements d. Reduction of operational risks 23.What defines “baseline development” in SCM? a. Creating user documentation b. Establishing configuration traceability c. Automating build processes d. Designing regression tests 24.What is the “trunk” in version control systems? a. A backup of the repository b. An archived test case c. A snapshot of the main repository d. The primary development path 25.Which task occurs during the “Process Implementation” activity in ISO/IEC 14764? a. Perform risk analysis b. Develop user training materials c. Create acceptance test cases d. Establish configuration management 26.What is the objective of delivery in the IEEE/EIA 1219 process? a. Validate compliance with configuration management b. Document all maintenance changes c. Finalize test automation scripts d. Ensure the system is installed and operational for users 27.Which phase in the IEEE/EIA 1219 process focuses on integrating code changes? a. Delivery b. Problem Identification c. Analysis d. Implementation 28.What distinguishes ISO/IEC 14764 from IEEE/EIA 1219? a. Use of tasks within processes b. Elimination of maintenance review c. Dependency on proprietary tools d. Focus on agile development 29.What is a key goal of system-level testing in software maintenance? a. Automate regression testing b. Finalize user training materials c. Ensure the system meets both original and new requirements d. Validate individual components in isolation 30.What is a key task during the Problem and Modification Analysis phase in ISO/IEC 14764? a. Configuration control b. Acceptance testing c. Feasibility analysis d. Migration planning 31.What is the primary goal of ISO/IEC 14764? a. To provide a framework for managing software maintenance b. To develop agile methodologies c. To replace legacy systems efficiently d. To implement new development methods 32.How does the Iterative Enhancement Model propagate changes? a. Directly through the system b. From requirements to code c. From test data to analysis d. From code to requirements 33.Which activity is critical in establishing a baseline? a. Reducing maintenance cost b. Finalizing training documents c. Creating a version snapshot d. Automating regression testing 34.What is a primary responsibility of configuration auditing? a. Ensure modifications comply with standards b. Track changes to version numbers c. Automate regression testing d. Maintain data backups 35.Which phase in the IEEE/EIA 1219 process focuses on integrating code changes? a. Delivery b. Problem Identification c. Analysis d. Implementation 36.Which stage of the Staged Model for CSS (closed source system) is characterized by simple and major changes with increasing cost and risk? a. Phase Out b. Servicing c. Initial Development d. Evolution 37.What is the primary purpose of configuration auditing? a. Verify baseline compliance b. Validate project costs c. Reduce deployment timelines d. Eliminate user complaints 38.Which activity is not part of the IEEE/EIA 1219 Maintenance Process? a. Problem Identification b. System Test c. Retirement d. Migration 39.Which model in software maintenance is characterized by quick changes made directly to the code without prior investigation? a. Change Mini-Cycle Model b. Full Reuse Model c. Quick Fix Model d. Iterative Enhancement Model 40.What does a physical configuration audit verify? a. Components of the baseline are correct b. Software design meets specifications c. Version history documentation d. Changes align with business goals 41.What is the primary focus during the Servicing phase in the Staged Model for CSS? a. Performing maintenance tasks b. Replacing the system c. Developing new features d. Simplifying the architecture Chapter 5_6 1. What is the primary function of a database wrapper? (page 1) a. Handle user authentication b. Replace the database schema c. Integrate legacy data with new components d. Manage server connections 2. What is the main disadvantage of using a dense reachability matrix? (page 2) a. It risks over-estimating the Candidate Impact Set (CIS) b. It simplifies the impact analysis process c. It requires less computational resources d. It underestimates the impact of changes 3. What is measured by the amplification ratio in ripple sensitivity? (page 3) a. The ratio of IISO to DISO b. The number of false positives in CIS c. The complexity of ripple effects d. The number of directly impacted objects to indirectly impacted objects 4. What is the primary role of the message handler in a wrapping framework? (page 4) a. To emulate I/O operations b. To buffer input and output messages c. To intercept and restructure requests d. To convert interfaces 5. Which tool is recommended for adapting a program for a wrapper? (page 5) a. Transaction wrapper b. Data converter c. Screen scraper d. Message handler 6. What is the primary purpose of impact analysis in software maintenance? (page 6) a. To create new software components b. To replace outdated systems c. To identify components impacted by a change request d. To reduce system complexity 7. Which migration strategy involves both the legacy and new systems operating simultaneously until the new system is deemed reliable? (page 7) a. Cut-and-Run b. Parallel Operation c. Phased Interoperability d. Freeze 8. During migration planning, what is the purpose of performing portfolio analysis? (page 8) a. To assess the technical quality and business value of systems b. To understand target technology c. To create a business case d. To identify stakeholders 9. Which graph is used to analyze dependencies among software components? (page 9) a. Call graph b. Histogram c. Organizational chart d. Flowchart 10.What does the external interface of a wrapper typically include? (page 10) a. Database schema details b. Internal interface specifications c. Message headers and body d. Legacy program code 11.What does a high out-degree of a node in a traceability graph suggest? (page 11) a. Efficient software design b. Simplified software maintenance c. Many nodes are likely to be modified d. Low software quality 12.How do Gotel and Finkelstein define traceability? (page 12) a. The ability to improve software usability b. The ability to automate software testing c. The ability to optimize software performance d. The ability to describe and follow the life of an artifact in both forward and backward directions 13.Which of the following is a characteristic of a legacy software system? (page 13) a. Easily expandable b. Uses modern programming languages c. Has consistent documentation d. Runs on old processors 14.What is the first step in migration planning? (page 15) a. Identify stakeholders b. Define the target architecture c. Perform portfolio analysis d. Create a business case 15.What is the main limitation of screen scraping? (page 17) a. Requires extensive user training b. Does not support modern functions or reduce maintenance costs c. Completely replaces the legacy system d. Involves high computational complexity 16.What is the main focus of migration planning in step 11? (page 18) a. Defining a strategy b. Reconciling the strategy with stakeholder needs c. Understanding the LIS d. Evaluating available technologies 17.Which metric represents the fraction of actual impacts contained in the Candidate Impact Set (CIS)? (page 21) a. Inclusiveness b. Precision c. Sharpness d. Recall 18.What is the definition of the Actual Impact Set (AIS)? (page 22) a. The set of components never impacted by changes b. The set of components estimated to be impacted c. The initial set of impacted objects d. The set of components actually changed as a result of a change request 19.Which migration method moves data instances from the legacy database to the target database? (page 23) a. System redevelopment b. Schema conversion c. Program conversion d. Data conversion 20.What is the focus of function wrappers? (page 25) a. Providing an interface to call specific functions in a wrapped entity b. Integrating databases with new technologies c. Encapsulating online transactions d. Enabling access to commonly used system services 21.Which wrapper type provides an interface to call functions in a wrapped entity? (page 26) a. Database wrapper b. System service wrapper c. Function wrapper d. Application wrapper 22.What is the goal of minimizing the differences between CIS and AIS in impact analysis? (page 29) a. To reduce system size b. To simplify regression testing c. To improve precision and recall d. To eliminate all dependencies 23.How is the connectivity matrix used in impact analysis? (page 30) a. To construct a reachability graph showing impacted entities b. To automate software testing c. To design user interfaces d. To estimate software development costs 24.Which migration method involves incremental changes rather than all at once? (page 34) a. Cold turkey b. Database first c. Composite database d. Iterative 25.What is an example of incremental migration in legacy systems? (page 36) a. Migrating components gradually while keeping the system operational b. Automating manual tasks immediately c. Replacing the entire system in one step d. Deleting unused modules 26.What does a low in-degree of nodes in a traceability graph indicate? (page 37) a. Good design b. High maintenance cost c. High complexity d. Poor software design 27.What is the primary focus of ripple effect analysis? (page 38) a. To enhance user interface design b. To improve software marketing strategies c. To assess the impact of a modification on various parts of a software system d. To reduce software development time 28.How does reverse engineering benefit legacy systems? (page 39) a. Simplifies user training b. Eliminates all technical debt c. Automates software upgrades d. Identifies obsolete components for replacement 29.Which metric represents the fraction of candidate impacts that are actually impacted? (page 42) a. Inclusiveness b. Recall c. Amplification d. Precision 30.Which of the following is NOT a common feature of a legacy system? (page 45) a. Lack of consistent documentation b. Degraded structure from modifications c. Runs on modern processors d. Written in obsolete programming languages 31.Which level of encapsulation involves starting a job on the server that accesses databases and produces output data? (page 49) a. Transaction level b. Module level c. Process level d. Procedure level 32. How is sharpness in impact analysis expressed? (page 50) a. Through the use of marketing strategies b. By the Change Rate c. By software usability d. Through customer feedback 33.Which of the following is NOT a type of technology typically evaluated during migration planning? (page 52) a. Legacy system architectures b. Languages and DBMS c. Distributed transaction models d. Middleware technologies 34.In the context of migration, what does schema conversion involve? (page 57) a. Translating the legacy database schema to a new structure b. Modifying program functionalities c. Adding new system functionalities d. Extracting data from the legacy database 35.What does the amplification measure in ripple-sensitivity? (page 60) a. The time taken to implement changes b. The ratio of indirectly impacted objects to directly impacted objects c. The overall cost of software maintenance d. The complexity of the software system 36.What does the term "adherence" in impact analysis refer to? (page 61) a. Identifying the ripple effect b. Avoiding the inclusion of unnecessary objects in CIS c. Measuring the effectiveness of heuristics d. Ensuring CIS is as close to AIS as possible 37.What is the benefit of using a wrapper for legacy systems? (page 64) a. Removes all compatibility issues b. Eliminates legacy system complexity c. Provides a new interface while hiding old implementation details d. Automatically updates the legacy system 38.What is the main challenge addressed by screen scraping in legacy systems? (page 70) a. System performance b. Data migration c. Functionality enhancement d. User interface improvement 39.Which traceability type connects software artifacts within the same model? (page 71) a. Vertical traceability b. External traceability c. Incremental traceability d. Horizontal traceability 40.What is the definition of a Discovered Impact Set (DIS)? (page 73) a. Objects eliminated from the AIS b. All unrelated components in the system c. Objects found during the analysis process d. Objects mistakenly included in the CIS 41.What is a common method to minimize false positives in impact analysis? (page 75) a. Reducing software functionality b. Using a distance-based or incremental approach c. Automating the testing process d. Increasing software complexity 42.Which method involves restructuring the system and retaining its basic functionality during migration? (page 80) a. Redevelopment b. Wrapping c. Freezing d. Migration 43.What is the role of a program dependency graph? (page 81) a. Tracking horizontal traceability b. Monitoring regression test results c. Documenting system requirements d. Identifying syntactic dependencies in the code 44.What does "wrapping" in legacy systems refer to? (page 85) a. Encapsulating the legacy component with a new software layer b. Manually rewriting the legacy system c. Replacing the legacy system entirely d. Automating system processes 45.What is a significant issue not addressed by screen scraping? (page 86) a. It is cost-effective b. It ignores overloading issues c. It provides a new interface d. It supports new functions 46.In the context of wrapping, what is the function of an I/O emulator? (page 104) a. To handle message buffering b. To convert interfaces c. To intercept inputs and outputs d. To modify legacy code 47.How is the False Positive Impact Set (FPIS) defined? (page 105) a. Objects discovered during impact analysis b. Components directly impacted by a change c. Objects estimated to be impacted but not actually impacted d. All objects within the system 48.What is the main purpose of a wrapper in legacy systems? (page 113) a. To convert legacy code to a new language b. To encapsulate legacy components with a new software layer c. To eliminate legacy components d. To directly access legacy system databases 49.Which aspect of effectiveness measures an approach's ability to avoid unnecessary inclusions in CIS? (page 115) a. Ripple-sensitivity b. Adherence c. Sharpness d. Inclusiveness 50. What technique is used to analyze the relationships among work products in a software system? (page 123) a. Regression testing b. Code optimization c. Traceability graph analysis d. User acceptance testing 51.Which of the following is a characteristic of effectiveness in impact analysis? (page 126) a. Complexity b. Ripple-sensitivity c. Cost-efficiency d. Simplicity 52.What type of analysis technique uses syntactic dependencies to identify the impact of changes? (page 127) a. Code optimization b. User interface design c. Marketing analysis d. Dependency-based impact analysis 53.What is the main disadvantage of screen scraping as a wrapping method? (page 135) a. It simplifies the legacy system b. It provides a graphical interface c. It is a permanent solution d. It incurs high maintenance costs MCQs on Refactoring (Chapter 7) 1. What is the primary goal of refactoring? a) To change the external behavior of software b) To improve internal software quality without altering functionality c) To rewrite legacy systems from scratch d) To enhance security features 2. Which of the following is NOT an effect of software evolution that leads to refactoring? a) Increased maintenance costs b) Improved understandability c) Decreased reliability d) Increased complexity 3. What is a code smell in the context of refactoring? a) A metric used to measure software efficiency b) A symptom in code that may indicate deeper issues c) A tool for detecting software vulnerabilities d) A technique for software testing 4. Which of the following is an example of a code smell? a) Duplicate code b) Properly named variables c) Well-documented methods d) Optimized loops 5. What is the first step in the refactoring process? a) Determine which refactorings to apply b) Identify what to refactor c) Apply refactorings to the chosen entities d) Maintain consistency 6. Which software entity is NOT commonly refactored? a) Source code b) Database schemas c) Hardware configurations d) Statechart diagrams 7. Why is testing crucial in refactoring? a) To evaluate system security b) To ensure software maintains its behavior c) To replace outdated components d) To measure execution speed 8. What is the purpose of sequential dependency analysis in refactoring? a) To eliminate duplicate classes b) To identify mutually exclusive refactorings c) To determine the correct order of applying refactorings d) To find unused variables in the code 9. What is the main limitation of refactoring? a) It increases software complexity b) It does not add new functionality c) It cannot improve code readability d) It requires rewriting the entire system 10.Which of the following refactorings is mutually exclusive? a) R1 and R8 b) R4 and R6 c) R3 and R5 d) R2 and R7 11.Which of the following is NOT a characteristic of refactoring? a) Improves internal code quality b) Preserves software functionality c) Changes the programming language d) Can be automated with tools 12.What is a common goal of software restructuring? a) To change the programming paradigm b) To remove all legacy components c) To improve software maintainability and reliability d) To increase software size 13.What does critical pair analysis help determine in refactoring? a) Which refactorings must be applied first b) Which refactorings cannot be applied together c) The complexity of refactoring a large system d) The impact of software restructuring on external users 14.Which refactoring moves a method to a subclass where it is more relevant? a) Move Method b) Push Down Method c) Pull Up Method d) Extract Class 15.Which refactoring reduces method parameter lists by using object references instead? a) Replace Parameter with Method b) Extract Method c) Substitute Algorithm d) Inline Method 16.What does preservation of call sequence ensure in refactoring? a) Software functionalities remain unchanged b) New features are added c) The program runs faster d) The code becomes more readable 17.What is the impact of increasing cohesion in refactored code? a) More dependencies between modules b) Code becomes harder to maintain c) Modules become more self-contained d) Reduced software reusability 18.What external quality is improved by refactoring? a) Increased source code size b) Higher CPU utilization c) Better maintainability d) Greater complexity 19.How does refactoring reduce system complexity? a) By rewriting all system modules b) By applying strict coding guidelines c) By breaking down large methods and classes d) By adding new functionalities 20.What is the primary difference between refactoring and restructuring? a) Refactoring improves internal quality, restructuring may change external behavior b) Restructuring only applies to object-oriented code c) Restructuring always requires database modifications d) Refactoring is used only for performance optimization 21.What is a disadvantage of refactoring? a) It requires more memory b) It is time-consuming and resource-intensive c) It permanently changes software behavior d) It introduces new software bugs 22.Which of the following best defines restructuring? a) Adding new software components b) Rewriting software in a new language c) Modifying software for improved readability and maintainability d) Enhancing software security features 23.Which refactoring technique eliminates redundant calculations? a) Extract Method b) Inline Method c) Replace Temp with Query d) Remove Dead Code 24.What is the purpose of parameterizing methods? a) To make code execution faster b) To reduce duplicated code performing similar operations c) To add new external functionalities d) To increase software complexity 25.Which technique helps programmers identify code that should be refactored? a) Performance testing b) Code smell detection c) Database schema conversion d) Automated debugging 26.What does Move Method do in refactoring? a) Eliminates unnecessary methods b) Moves a method to the class where it is most relevant c) Deletes redundant parameters d) Creates a new method 27.How can tool support help in refactoring? a) By completely automating software development b) By identifying code smells and suggesting improvements c) By replacing the software with a new version d) By eliminating the need for programmers 28.Which of the following metrics is likely to improve after refactoring? a) Increased code duplication b) Higher class coupling c) Lower complexity d) More dependencies 29.Why is maintaining consistency important in refactoring? a) To ensure developers work on different parts of the codebase b) To keep refactored software aligned with documentation and requirements c) To increase runtime performance d) To add new system features 30.What is the main benefit of refactoring? a) Faster software execution b) Reduced security risks c) Improved software design without altering behavior d) Increased hardware efficiency Answers: b) To improve internal software quality without altering functionality b) Improved understandability b) A symptom in code that may indicate deeper issues a) Duplicate code b) Identify what to refactor c) Hardware configurations b) To ensure software maintains its behavior c) To determine the correct order of applying refactorings b) It does not add new functionality b) R4 and R6 c) Changes the programming language c) To improve software maintainability and reliability b) Which refactorings cannot be applied together b) Push Down Method a) Replace Parameter with Method a) Software functionalities remain unchanged c) Modules become more self-contained c) Better maintainability c) By breaking down large methods and classes a) Refactoring improves internal quality, restructuring may change external behavior b) It is time-consuming and resource-intensive c) Modifying software for improved readability and maintainability c) Replace Temp with Query b) To reduce duplicated code performing similar operations b) Code smell detection b) Moves a method to the class where it is most relevant b) By identifying code smells and suggesting improvements c) Lower complexity b) To keep refactored software aligned with documentation and requirements c) Improved software design without altering behavior **************************************************************** MCQs on Program Comprehension (Chapter 8) 1. What is the primary goal of program comprehension? a) To rewrite legacy systems from scratch b) To understand and maintain complex software systems c) To enhance runtime performance d) To automate software testing 2. Which of the following is NOT a challenge in program comprehension? a) Inaccurate or incomplete documentation b) Code complexity c) Increased execution speed d) Lack of domain knowledge 3. What is a mental model in program comprehension? a) A standardized UML diagram of the software system b) A programmer’s internal representation of the program c) A simulation of program execution d) A software testing strategy 4. Which of the following is a static element of a mental model? a) Chunking b) Cross-referencing c) Text-structures d) Strategies 5. What is the purpose of chunking in program comprehension? a) To simplify user interfaces b) To divide the program into smaller, meaningful parts c) To increase execution speed d) To replace outdated functions 6. Which of the following is a dynamic element of a mental model? a) Plans b) Cross-referencing c) Text-structures d) Schemas 7. What is the primary purpose of beacons in program comprehension? a) To provide execution logs for debugging b) To serve as hints about the program’s functionality c) To optimize memory usage d) To restructure program control flow 8. Which type of plan includes domain-specific knowledge about real-world problems? a) Programming plans b) Domain plans c) Software architecture plans d) Cognitive models 9. In program comprehension, what is a schema? a) A memory structure used for optimizing program execution b) A general knowledge structure guiding the interpretation of code c) A low-level implementation of software modules d) A debugging tool 10.What does cross-referencing help with in program comprehension? a) Linking elements of different abstraction levels b) Identifying syntax errors c) Optimizing data structures d) Generating automatic test cases 11.What is a hypothesis in program comprehension? a) A conjecture about the purpose or function of a code element b) A design pattern used in software engineering c) A type of programming paradigm d) A debugging strategy 12.Which of the following is NOT a factor affecting code comprehension? a) Programmer’s expertise level b) System documentation c) Compilation time d) Code structure 13.What is the primary difference between a novice and an expert programmer in comprehension? a) Novices focus on syntax, while experts focus on functionality b) Experts write code faster than novices c) Novices use more debugging tools than experts d) Experts rely only on automated tools for comprehension 14.What is the role of protocol analysis in program comprehension? a) It defines a set of programming rules for readability b) It analyzes a programmer’s thought process during code comprehension c) It creates a flowchart of software execution d) It measures software performance 15.What technique in protocol analysis requires programmers to verbalize their thoughts while reading code? a) Code profiling b) Think Aloud Protocol (TAP) c) Dynamic analysis d) Abstract interpretation 16.Which of the following is a cognition model for program comprehension? a) Waterfall model b) Brooks model c) Agile model d) Spiral model 17.What does the Pennington model focus on in program comprehension? a) A bottom-up approach b) A top-down approach c) A combination of bottom-up and top-down approaches d) A heuristic-driven approach 18.In cognitive models, what is the top-down approach used for? a) Understanding code from individual statements to high-level structure b) Breaking down an entire system into smaller modules c) Interpreting the software at an abstract level before looking at code details d) Optimizing program execution speed 19.How does visualization aid in program comprehension? a) By increasing software execution speed b) By representing code structure graphically c) By modifying the program’s behavior d) By removing redundant code 20.Which tool is NOT commonly used for visualization in program comprehension? a) Unified Modeling Language (UML) b) Fisheye view c) Assembly code debugger d) Program Analysis Tool (PAT) 21.What is the primary function of the Program Understanding Support (PUNS) environment? a) To test software security vulnerabilities b) To aid in understanding complex software systems c) To debug memory leaks in software d) To automate software refactoring 22.How does the City Metaphor visualization technique help in program comprehension? a) It converts source code into a textual summary b) It represents software components as buildings in a city layout c) It creates a sequence diagram of function calls d) It provides real-time memory profiling 23.Which of the following best describes programming discourse rules? a) Guidelines for using design patterns b) Rules that programmers follow when naming functions and variables c) Security policies for software deployment d) Syntax rules enforced by the compiler 24.What is a common challenge when trying to understand legacy code? a) The code has no logical flow b) Documentation is often missing or outdated c) The programming language is unsupported by modern compilers d) The code runs too slowly 25.What is a functional chunk in program comprehension? a) A self-contained unit of related code b) A debugging breakpoint in code c) A single line of code within a function d) A class that inherits multiple interfaces 26.Which of the following is an example of a beacon in program comprehension? a) An unused variable b) A function named calculateTax() c) A loop with an empty body d) A missing return statement 27.What is the primary advantage of the bottom-up approach in program comprehension? a) It allows quick understanding of the system’s high-level purpose b) It focuses on detailed code analysis before forming a high-level picture c) It prioritizes software testing over design d) It optimizes software performance 28.In program comprehension, what does chunking help with? a) Identifying related sections of code to create higher-level abstractions b) Automatically renaming variables for clarity c) Measuring execution time of a function d) Rewriting code to follow object-oriented principles 29.What is a plan in program comprehension? a) A reusable sequence of programming steps b) A roadmap for software deployment c) A project management technique d) A test case generation approach 30.What is the primary purpose of code cognition models? a) To help programmers understand and interpret code b) To automatically generate code documentation c) To optimize runtime performance d) To enforce coding standards Answers: b) To understand and maintain complex software systems c) Increased execution speed b) A programmer’s internal representation of the program c) Text-structures b) To divide the program into smaller, meaningful parts b) Cross-referencing b) To serve as hints about the program’s functionality b) Domain plans b) A general knowledge structure guiding the interpretation of code a) Linking elements of different abstraction levels a) A conjecture about the purpose or function of a code element c) Compilation time a) Novices focus on syntax, while experts focus on functionality b) It analyzes a programmer’s thought process during code comprehension b) Think Aloud Protocol (TAP) b) Brooks model a) A bottom-up approach c) Interpreting the software at an abstract level before looking at code details b) By representing code structure graphically c) Assembly code debugger b) To aid in understanding complex software systems b) It represents software components as buildings in a city layout b) Rules that programmers follow when naming functions and variables b) Documentation is often missing or outdated a) A self-contained unit of related code b) A function named calculateTax)( b) It focuses on detailed code analysis before forming a high-level picture a) Identifying related sections of code to create higher-level abstractions a) A reusable sequence of programming steps a) To help programmers understand and interpret code

Use Quizgecko on...
Browser
Browser