ME or MEng Master of Engineering Master of Software Engineering 2 — Questions and Answers
Question 1: Which architectural pattern separates an application into independently deployable services, each running in its own process and communicating via lightweight mechanisms?
- Monolithic architecture
- Microservices architecture (Correct answer)
- Layered architecture
- Pipe-and-filter architecture
Correct answer: Microservices architecture
Microservices architecture decomposes an application into small, independent services that communicate over APIs or message queues.
Question 2: In software testing, what does 'mutation testing' evaluate?
- The speed of test execution under load
- The effectiveness of a test suite by introducing small code changes (Correct answer)
- The coverage of code paths by automated tests
- The compatibility of code across different environments
Correct answer: The effectiveness of a test suite by introducing small code changes
Mutation testing introduces small syntactic changes (mutants) to source code and checks whether existing tests detect those changes.
Question 3: What is the primary purpose of a software architecture's 'quality attribute utility tree' in the ATAM method?
- To document all functional requirements
- To prioritize and refine quality attribute scenarios for architectural evaluation (Correct answer)
- To map source code modules to runtime processes
- To define the deployment topology of a system
Correct answer: To prioritize and refine quality attribute scenarios for architectural evaluation
The utility tree in ATAM structures and prioritizes quality attributes (e.g., performance, security) into concrete, testable scenarios.
Question 4: Which concurrency model does Go (Golang) use to avoid shared-state race conditions?
- Actor model with mailboxes
- Communicating Sequential Processes (CSP) with goroutines and channels (Correct answer)
- Software Transactional Memory (STM)
- Lock-free atomic operations exclusively
Correct answer: Communicating Sequential Processes (CSP) with goroutines and channels
Go implements CSP, where goroutines communicate by passing messages through channels rather than sharing memory.
Question 5: In database systems, what anomaly does the SERIALIZABLE isolation level prevent that READ COMMITTED does not?
- Dirty reads
- Non-repeatable reads
- Phantom reads (Correct answer)
- Lost updates
Correct answer: Phantom reads
SERIALIZABLE prevents phantom reads — new rows inserted by concurrent transactions becoming visible within the same transaction — which READ COMMITTED allows.
Question 6: What does the 'L' in the SOLID principles stand for, and what does it require?
- Liskov Substitution — subtypes must be substitutable for their base types without altering correctness (Correct answer)
- Layering — modules must be organized into hierarchical layers
- Loose Coupling — modules must minimize dependencies on each other
- Least Privilege — objects must only access what they need
Correct answer: Liskov Substitution — subtypes must be substitutable for their base types without altering correctness
The Liskov Substitution Principle states that objects of a subclass must behave correctly wherever the superclass is expected.
Question 7: Which technique does a compiler use to eliminate redundant load/store operations by keeping variable values in registers across multiple expressions?
- Dead code elimination
- Loop unrolling
- Register allocation via graph coloring (Correct answer)
- Constant folding
Correct answer: Register allocation via graph coloring
Register allocation assigns program variables to a limited set of CPU registers, often modeled as a graph-coloring problem to minimize memory accesses.
Which architectural pattern separates an application into independently deployable services, each running in its own process and communicating via lightweight mechanisms?