Software Engineering Software Engineering MCQ 5 — Questions and Answers
Question 1: Which architectural pattern separates an application into three interconnected components: model, view, and controller?
- Repository Pattern
- MVC Pattern (Correct answer)
- Event-Driven Architecture
- Hexagonal Architecture
Correct answer: MVC Pattern
The Model-View-Controller (MVC) pattern separates concerns into the data model, user interface view, and controller that handles input and updates both.
Question 2: What does 'cohesion' measure in the context of software module design?
- The degree of interdependence between modules
- How strongly related and focused the responsibilities of a module are (Correct answer)
- The number of external APIs a module depends on
- The ratio of comments to lines of code in a module
Correct answer: How strongly related and focused the responsibilities of a module are
Cohesion measures how closely related and focused the internal elements of a module are; high cohesion means a module does one thing well.
Question 3: In Scrum, what is the role of the Product Owner?
- Facilitate daily standups and remove impediments
- Manage team velocity and assign tasks to developers
- Prioritize the product backlog and represent stakeholder interests (Correct answer)
- Approve all pull requests before code is merged
Correct answer: Prioritize the product backlog and represent stakeholder interests
The Product Owner is responsible for maximizing the product's value by managing and prioritizing the product backlog and representing stakeholders' interests.
Question 4: Which software estimation technique uses historical project data and adjusts for differences in the new project?
- Function Point Analysis
- COCOMO Model
- Analogous Estimation (Correct answer)
- Planning Poker
Correct answer: Analogous Estimation
Analogous estimation leverages actual data from past similar projects and adjusts the estimates based on known differences to predict the new project's effort.
Question 5: What is a race condition in concurrent software systems?
- A performance benchmark comparing two algorithms' speed
- A bug where program outcome depends on unpredictable timing of concurrent operations (Correct answer)
- A scheduling algorithm that gives priority to fastest-completing threads
- A deadlock caused by circular resource dependencies
Correct answer: A bug where program outcome depends on unpredictable timing of concurrent operations
A race condition occurs when a program's behavior depends on the relative timing of events like thread execution order, leading to unpredictable and often incorrect results.
Question 6: Which of the following best describes the concept of 'separation of concerns' in software engineering?
- Dividing software teams by geographic location
- Breaking a program into distinct sections, each addressing a separate concern (Correct answer)
- Separating development and operations responsibilities
- Isolating third-party libraries from internal code
Correct answer: Breaking a program into distinct sections, each addressing a separate concern
Separation of concerns is a design principle for organizing code by dividing it into distinct sections so each section addresses a separate aspect of the software's functionality.
Question 7: What is the purpose of a software design review (also called a peer review or code review)?
- Measure the speed of code execution in production
- Identify defects and improve code quality through systematic examination (Correct answer)
- Automatically generate documentation from source code comments
- Deploy code to staging environments for user acceptance testing
Correct answer: Identify defects and improve code quality through systematic examination
A design or code review is a systematic examination of software artifacts by peers to find defects, ensure standards compliance, and improve overall quality.
Which architectural pattern separates an application into three interconnected components: model, view, and controller?