Software Engineering Prep 2 ā Questions and Answers
Question 1: Which SDLC model is best suited when requirements are well-understood and unlikely to change?
- Agile
- Spiral
- Waterfall (Correct answer)
- Kanban
Correct answer: Waterfall
Waterfall's sequential phases work best when requirements are stable and fully defined upfront.
Question 2: In software engineering, what does 'technical debt' refer to?
- Licensing fees for third-party libraries
- Cost of hardware infrastructure
- Future rework caused by taking shortcuts in development (Correct answer)
- Budget overruns on a project
Correct answer: Future rework caused by taking shortcuts in development
Technical debt is the implied cost of future refactoring when a quick solution is chosen over a better long-term approach.
Question 3: What is the primary purpose of a code review?
- To measure developer productivity
- To catch defects and improve code quality before merging (Correct answer)
- To generate automated test cases
- To document the codebase
Correct answer: To catch defects and improve code quality before merging
Code reviews allow peers to identify bugs, logic errors, and design issues before code reaches production.
Question 4: Which data structure uses LIFO (Last In, First Out) ordering?
- Queue
- Heap
- Stack (Correct answer)
- Linked List
Correct answer: Stack
A stack removes the most recently added element first, following LIFO order.
Question 5: What does 'DRY' stand for in software development principles?
- Design Requires You
- Don't Repeat Yourself (Correct answer)
- Data Retrieval Yield
- Dynamic Runtime Yield
Correct answer: Don't Repeat Yourself
DRY means every piece of knowledge should have a single authoritative representation to reduce redundancy.
Question 6: In Big O notation, which complexity represents a linear relationship between input size and runtime?
- O(1)
- O(log n)
- O(n) (Correct answer)
- O(n²)
Correct answer: O(n)
O(n) means the runtime grows proportionally with the number of input elements.
Question 7: Which version control concept allows developers to work on a feature without affecting the main codebase?
- Commit
- Tag
- Branch (Correct answer)
- Merge conflict
Correct answer: Branch
Branches let developers isolate work, then integrate it back to the main line when ready.
Which SDLC model is best suited when requirements are well-understood and unlikely to change?