Software Engineering Software Engineering MCQ 3 — Questions and Answers
Question 1: What is the main goal of refactoring in software engineering?
- Add new features to the codebase
- Improve internal code structure without changing behavior (Correct answer)
- Fix critical security vulnerabilities
- Optimize database query performance
Correct answer: Improve internal code structure without changing behavior
Refactoring restructures existing code to improve readability and maintainability while preserving its external behavior.
Question 2: Which testing type verifies that previously working functionality still works after a code change?
- Unit Testing
- Integration Testing
- Regression Testing (Correct answer)
- Acceptance Testing
Correct answer: Regression Testing
Regression testing ensures that new changes have not broken any existing functionality that previously worked correctly.
Question 3: In software architecture, what does a microservices architecture emphasize?
- One large deployable application unit
- Small, independently deployable services (Correct answer)
- Shared global state across all components
- Single programming language for all services
Correct answer: Small, independently deployable services
Microservices architecture structures an application as a collection of small, loosely coupled services that can be deployed and scaled independently.
Question 4: What does 'technical debt' refer to in software engineering?
- Software licensing fees owed to vendors
- Cost of hardware infrastructure upgrades
- Future rework caused by choosing quick solutions now (Correct answer)
- Financial loss due to a software project failure
Correct answer: Future rework caused by choosing quick solutions now
Technical debt represents the implied cost of future rework required when developers choose quick, easy solutions over better but more time-consuming approaches.
Question 5: Which version control strategy involves each developer having a full copy of the repository history?
- Centralized Version Control
- Distributed Version Control (Correct answer)
- Lock-Based Version Control
- Linear Version Control
Correct answer: Distributed Version Control
In distributed version control systems like Git, every developer has a complete local copy of the entire repository history.
Question 6: What is the primary distinction between functional and non-functional requirements?
- Functional requirements describe system behavior; non-functional describe quality attributes (Correct answer)
- Functional requirements are optional; non-functional are mandatory
- Functional requirements come from developers; non-functional from clients
- Functional requirements are testable; non-functional are not
Correct answer: Functional requirements describe system behavior; non-functional describe quality attributes
Functional requirements define what the system should do (features and behaviors), while non-functional requirements define how the system should perform (performance, security, scalability).
Question 7: In the context of software testing, what is a 'test oracle'?
- A tool that automatically generates test cases
- A mechanism to determine if a test has passed or failed (Correct answer)
- A database of known software bugs
- A performance benchmarking framework
Correct answer: A mechanism to determine if a test has passed or failed
A test oracle is any mechanism used to determine whether the output of a test execution is correct, i.e., whether the system passed or failed the test.
What is the main goal of refactoring in software engineering?