ICT Software Development Concepts 3 — Questions and Answers
Question 1: Which testing approach verifies that individual components work correctly in isolation?
- Integration testing
- System testing
- Unit testing (Correct answer)
- Acceptance testing
Correct answer: Unit testing
Unit testing focuses on testing the smallest testable parts of an application — individual functions or methods — in isolation.
Question 2: What is the main characteristic of a 'microservices' architecture?
- A single deployable unit containing all application functionality
- An application built as a collection of small, independently deployable services (Correct answer)
- Software that runs only on mobile devices
- A database with minimal tables
Correct answer: An application built as a collection of small, independently deployable services
Microservices architecture structures an application as a collection of loosely coupled services, each implementing a specific business capability.
Question 3: What does 'refactoring' mean in software development?
- Rewriting the entire application from scratch
- Restructuring existing code without changing its external behavior (Correct answer)
- Adding new features to existing code
- Testing code to find bugs
Correct answer: Restructuring existing code without changing its external behavior
Refactoring is the process of restructuring existing code to improve its internal structure while preserving its observable behavior.
Question 4: In object-oriented programming, what is 'encapsulation'?
- The ability of a class to inherit from multiple parent classes
- Bundling data and methods that operate on that data within a single unit and restricting direct access (Correct answer)
- Creating multiple objects from a single class
- Overriding methods in a subclass
Correct answer: Bundling data and methods that operate on that data within a single unit and restricting direct access
Encapsulation bundles an object's data and the methods that operate on it together, hiding internal implementation details.
Question 5: What is a 'race condition' in software development?
- A performance benchmark test between competing algorithms
- A bug occurring when program behavior depends on unpredictable timing of concurrent operations (Correct answer)
- A competition between development teams to ship features
- A situation where two loops execute at the same speed
Correct answer: A bug occurring when program behavior depends on unpredictable timing of concurrent operations
A race condition occurs when the output of a concurrent program depends on the relative timing or order of thread execution.
Question 6: Which of the following best describes 'continuous integration' (CI)?
- Deploying code to production multiple times per day
- Frequently merging code changes into a shared repository with automated testing (Correct answer)
- Writing integration tests for all APIs
- Continuously monitoring application performance in production
Correct answer: Frequently merging code changes into a shared repository with automated testing
Continuous integration is the practice of frequently merging developer code changes into a shared repository, triggering automated builds and tests.
Question 7: What is the purpose of an 'API gateway' in a microservices architecture?
- To store data shared between all microservices
- To act as a single entry point that routes client requests to the appropriate microservices (Correct answer)
- To generate API documentation automatically
- To compile microservices into a single executable
Correct answer: To act as a single entry point that routes client requests to the appropriate microservices
An API gateway serves as the single entry point for all clients, routing requests to appropriate microservices and handling cross-cutting concerns.
Which testing approach verifies that individual components work correctly in isolation?