ME or MEng Master of Engineering Master of Software Engineering 5 — Questions and Answers
Question 1: What is the primary goal of 'continuous integration' (CI) in a software development pipeline?
- To automatically deploy code to production after every commit
- To detect integration errors quickly by merging and building developer changes frequently (Correct answer)
- To enforce code style rules through automated linting on every pull request
- To generate release notes from commit messages automatically
Correct answer: To detect integration errors quickly by merging and building developer changes frequently
CI integrates code changes into a shared repository frequently, running automated builds and tests to catch integration bugs early.
Question 2: Which software architectural style uses an 'event bus' where producers publish events and consumers subscribe independently, with no direct coupling?
- Client-Server
- Event-Driven Architecture (EDA) (Correct answer)
- Model-View-Controller (MVC)
- Service-Oriented Architecture (SOA)
Correct answer: Event-Driven Architecture (EDA)
EDA decouples producers and consumers through an event bus or broker (e.g., Kafka, RabbitMQ), enabling asynchronous, loosely-coupled communication.
Question 3: In software project estimation, what does the 'COCOMO II' model primarily use as a size input?
- Story points estimated by the development team
- Function points or source lines of code (SLOC) (Correct answer)
- Number of use cases in the requirements document
- Database table count weighted by complexity
Correct answer: Function points or source lines of code (SLOC)
COCOMO II uses SLOC or function points as primary size measures and applies cost drivers and scale factors to estimate effort and schedule.
Question 4: What is 'dependency injection' and what problem does it solve?
- A build tool feature that automatically downloads library dependencies; solves version conflicts
- A design pattern where dependencies are provided externally rather than created internally; solves tight coupling (Correct answer)
- A runtime technique that patches code paths to add monitoring; solves observability gaps
- A refactoring method that inlines method calls; solves performance bottlenecks
Correct answer: A design pattern where dependencies are provided externally rather than created internally; solves tight coupling
Dependency injection supplies an object's dependencies from outside (via constructor, setter, or interface), reducing coupling and improving testability.
Question 5: Which property of a cryptographic hash function ensures that finding two different inputs with the same hash output is computationally infeasible?
- Pre-image resistance
- Second pre-image resistance
- Collision resistance (Correct answer)
- Avalanche effect
Correct answer: Collision resistance
Collision resistance means it is computationally infeasible to find any two distinct inputs x and y such that H(x) = H(y).
Question 6: In the context of software refactoring, what is 'extract method' and when is it typically applied?
- Pulling shared code into a parent class when multiple subclasses duplicate it
- Turning a code fragment into a new method with a descriptive name to improve readability (Correct answer)
- Moving a method from one class to another where it is more logically relevant
- Replacing a method call with the method body inline to reduce call overhead
Correct answer: Turning a code fragment into a new method with a descriptive name to improve readability
Extract Method takes a cohesive block of code within a method and moves it into a new, well-named method, reducing method length and improving clarity.
Question 7: What does 'observability' in software systems encompass, beyond traditional monitoring?
- Automated alerting when predefined thresholds are exceeded
- The ability to infer internal system state from external outputs — metrics, logs, and traces combined (Correct answer)
- Real-time dashboards displaying CPU and memory utilization
- A/B testing infrastructure for measuring feature impact on user behavior
Correct answer: The ability to infer internal system state from external outputs — metrics, logs, and traces combined
Observability enables engineers to ask arbitrary questions about system behavior using metrics, structured logs, and distributed traces without requiring new instrumentation.
What is the primary goal of 'continuous integration' (CI) in a software development pipeline?