Software Engineering Basic Software Engineering 4 — Questions and Answers
Question 1: What is the difference between functional and non-functional requirements?
- Functional requirements describe what a system does; non-functional describe how well it does it (Correct answer)
- Functional requirements are optional; non-functional are mandatory
- Functional requirements cover UI; non-functional cover business logic
- There is no meaningful difference between them
Correct answer: Functional requirements describe what a system does; non-functional describe how well it does it
Functional requirements define specific behaviors or functions, while non-functional requirements define quality attributes like performance, scalability, and security.
Question 2: Which of the following best describes a 'microservices' architecture?
- A single large application deployed on many servers
- An application structured as a collection of small, independently deployable services (Correct answer)
- A minimalist programming approach using as few lines of code as possible
- A mobile-first design pattern for web applications
Correct answer: An application structured as a collection of small, independently deployable services
Microservices breaks an application into small services that each own a specific business capability and communicate via APIs.
Question 3: What is 'continuous integration' (CI) in software engineering?
- Deploying software updates to production without human approval
- Automatically merging and testing developer code changes frequently into a shared repository (Correct answer)
- Integrating user feedback into product requirements daily
- Running software on multiple operating systems simultaneously
Correct answer: Automatically merging and testing developer code changes frequently into a shared repository
Continuous Integration is the practice of automatically building and testing code every time a developer commits changes to reduce integration problems.
Question 4: In database design, what is normalization?
- Converting a relational database to a NoSQL format
- Organizing a database to reduce redundancy and improve data integrity by applying normal forms (Correct answer)
- Encrypting sensitive data stored in database tables
- Optimizing query performance through indexing
Correct answer: Organizing a database to reduce redundancy and improve data integrity by applying normal forms
Normalization restructures tables to eliminate redundant data and ensure that data dependencies make logical sense.
Question 5: What does an API gateway do in a distributed system?
- Stores user credentials for all backend services
- Acts as a single entry point that routes client requests to the appropriate backend services (Correct answer)
- Compiles source code from multiple microservices
- Monitors database query performance across services
Correct answer: Acts as a single entry point that routes client requests to the appropriate backend services
An API gateway serves as a reverse proxy that handles request routing, authentication, rate limiting, and load balancing for backend services.
Question 6: What is the purpose of code review in a software team?
- To measure individual developer productivity
- To identify bugs, enforce coding standards, and share knowledge among team members (Correct answer)
- To generate automated test cases from source code
- To create user documentation from inline comments
Correct answer: To identify bugs, enforce coding standards, and share knowledge among team members
Code review involves peers examining each other's code to catch defects early, ensure consistency, and spread understanding of the codebase.
Question 7: Which data structure would be most efficient for implementing an undo/redo feature in a text editor?
- Queue
- Stack (Correct answer)
- Hash table
- Binary tree
Correct answer: Stack
A stack's LIFO (Last In, First Out) behavior naturally supports undo by popping the most recent action off the top.
What is the difference between functional and non-functional requirements?