Software Engineering Software Engineering MCQ 2 — Questions and Answers
Question 1: Which software process model is best suited when requirements are well-understood and unlikely to change?
- Spiral Model
- Waterfall Model (Correct answer)
- Agile Model
- Prototype Model
Correct answer: Waterfall Model
The Waterfall Model works best when requirements are stable and fully understood upfront, since it follows a rigid sequential phase structure.
Question 2: What does the 'O' in SOLID principles stand for?
- Object Composition
- Open/Closed Principle (Correct answer)
- Operational Dependency
- Overloading Prevention
Correct answer: Open/Closed Principle
The Open/Closed Principle states that software entities should be open for extension but closed for modification.
Question 3: In Agile, what is the primary purpose of a retrospective meeting?
- Plan the next sprint backlog
- Demo completed features to stakeholders
- Reflect and improve team process (Correct answer)
- Estimate story points for new tasks
Correct answer: Reflect and improve team process
A retrospective is held at the end of a sprint to identify what went well, what didn't, and how to improve the team's process.
Question 4: Which type of coupling is considered the most desirable in software design?
- Content Coupling
- Common Coupling
- Data Coupling (Correct answer)
- Control Coupling
Correct answer: Data Coupling
Data coupling, where modules share only necessary data through parameters, is the most desirable because it minimizes interdependencies.
Question 5: What is cyclomatic complexity primarily used to measure?
- Memory usage of a program
- Number of logical paths through code (Correct answer)
- Database query efficiency
- Class hierarchy depth
Correct answer: Number of logical paths through code
Cyclomatic complexity measures the number of linearly independent paths through a program's source code, indicating its testability and maintainability.
Question 6: Which software design pattern is used to ensure only one instance of a class exists?
- Factory Pattern
- Observer Pattern
- Singleton Pattern (Correct answer)
- Decorator Pattern
Correct answer: Singleton Pattern
The Singleton Pattern restricts instantiation of a class to a single object and provides a global point of access to it.
Question 7: In UML, which diagram is best used to show the sequence of messages exchanged between objects?
- Class Diagram
- Use Case Diagram
- Sequence Diagram (Correct answer)
- Activity Diagram
Correct answer: Sequence Diagram
A Sequence Diagram depicts the order of interactions between objects along a timeline, showing how and when messages are passed.
Which software process model is best suited when requirements are well-understood and unlikely to change?