Question 1
Which of the following test cases ensures branch coverage for the Python code given below?
x = 5, y = 10
x = 15, y = 10
Both x = 5, y = 10 and x = 15, y = 10
Only when x = y

The IIT Madras BS Software Engineering (Software Engineering) End Term paper sat on 21 Dec 2025, in the September 2025 term: 25 questions for 100 marks in 180 minutes. Every question is below with its answer. Take it as a timed mock test to be marked, or read it through first.
Which of the following test cases ensures branch coverage for the Python code given below?
x = 5, y = 10
x = 15, y = 10
Both x = 5, y = 10 and x = 15, y = 10
Only when x = y
Correct answer
Both x = 5, y = 10 and x = 15, y = 10
Which type of testing is carried out by the customer to decide whether to approve the product?
Alpha testing
Acceptance testing
Smoke testing
System testing
Correct answer
Acceptance testing
Which testing approach allows early testing of the main logic, even if the low-level modules are not yet implemented?
Bottom-up
Top-down
Big bang
Mixed
Correct answer
Top-down
What is the cyclomatic complexity of the following Python function?
2
3
4
5
Correct answer
5
Consider the following Python function:
From a blackbox testing perspective, how many input equivalence classes are appropriate for testing this function?
3
4
5
6
Correct answer
5
You are building a complex product object in the seller onboarding process. A SellerProfile object requires many optional parameters such as GST number, website, alternate contact, and warehouse list. You want to allow a flexible and readable way to construct such objects without passing all parameters in a constructor. Which pattern best supports this requirement?
Factory Pattern
Builder Pattern
Facade Pattern
Adapter Pattern
Correct answer
Builder Pattern
A DiscountCalculator class applies discount rules for Regular and Premium customers using a switch statement. Now, to add a new customer type VIP, the developer modifies the same method to add another case block. Which SOLID principle is being violated?
Interface Segregation Principle
Dependency Inversion Principle
Open-Closed Principle
Liskov Substitution Principle
Correct answer
Open-Closed Principle
A software module defines an interface PaymentMethod. Another class UPIPayment implements this interface. What kind of relationship does UPIPayment have with PaymentMethod?
Inheritance
Composition
Dependency
Aggregation
Correct answer
Dependency
In a poorly designed legacy system, a module includes unrelated functions like loginUser(), calculateTax(), and sendEmail(). These functions do not share data or purpose. What type of cohesion does this module likely have?
Functional cohesion
Sequential cohesion
Procedural cohesion
Coincidental cohesion
Correct answer
Coincidental cohesion
Which of the following activities occur after a sprint is completed?
Sprint planning
Sprint review
Daily stand-up
Sprint retrospective
Correct answers
Sprint review
Sprint retrospective
Which of the following are true regarding an Activity Network?
It helps identify independent tasks that can be done in parallel
It replaces the need for a Work Breakdown Structure
It represents the estimated cost for each task
It visually shows task dependencies and durations
Correct answers
It helps identify independent tasks that can be done in parallel
It visually shows task dependencies and durations
A project manager prepares a risk table with probabilities and numerical impact levels for each identified risk. Which of the following combinations would receive the highest priority?
Probability: 20%, Impact: 2
Probability: 80%, Impact: 3
Probability: 50%, Impact: 4
Probability: 90%, Impact: 3
Correct answer
Probability: 90%, Impact: 3
A banking app places the "Transfer Money" button in the same position across the dashboard, accounts, and payments screens, using the same label and icon each time. Which heuristic is best demonstrated in this design?
Flexibility and efficiency of use
Familiar metaphors
Consistency
Visibility of system status
Correct answer
Consistency
A project management app uses intuitive icons, consistent layouts, and familiar menu structures so that returning users can quickly resume work after a gap. Which usability goal does this reflect?
Effectiveness
Efficiency
Learnability
Memorability
Correct answer
Memorability
During a design meeting, a product owner is unclear about a feature's purpose. The designer draws a simple sketch of a UI and explains how the user will interact with it. What benefit of prototyping does this illustrate?
Ensures performance optimization
Clarifies vague requirements
Tests final implementation
Avoids need for feedback
Correct answer
Clarifies vague requirements
1 and 3 is a functional, 2 is a nonfunctional requirement
1 and 2 are nonfunctional, 3 is a functional requirement
1 is a functional, 2 and 3 are nonfunctional requirements
1 and 2 are functional, 3 is a nonfunctional requirement
Correct answer
1 is a functional, 2 and 3 are nonfunctional requirements
The mobile sales team wants daily sales summaries, while the furniture department prefers 30-day summaries. You identify this difference while conducting a joint session with multiple stakeholders. What requirement gathering technique is this?
Questionnaire
Focus Group
Observation
Structured Interview
Correct answer
Focus Group
A team of developers begins coding a complex online payment system without discussing a common structure. One developer modifies a function signature without informing others, breaking multiple components dependent on that function. Which phase was likely skipped or inadequately done?
Requirement Gathering
Testing
Design
Maintenance
Correct answer
Design
A research institute wants to deploy a high-performance computing web application. It requires maximum speed, full system control, and does not mind paying a high upfront cost. Which hosting option is most appropriate for their needs?
Platform as a Service (PaaS)
Infrastructure as a Service (IaaS)
Shared Hosting
Bare Metal Server
Correct answer
Bare Metal Server
Your team deploys a major update to a new server setup. If anything breaks, they want to instantly switch all users back to the older version. Which deployment strategy enables this type of rollback?
Canary Deployment
Blue-Green Deployment
Version Deployment
Shadow Deployment
Correct answer
Blue-Green Deployment
A software company is planning to launch a new product. Before development begins, the team needs to identify the target audience and understand what features would add the most value. Which team is primarily responsible for this task?
Engineering Team
Marketing Team
Support Team
Legal Team
Correct answer
Marketing Team
Ananya is developing a Python-based web application. She wants a tool that not only allows her to write code but also helps her with syntax checking, renaming variables across the project, and locating function usage. Which of the following tools is most suitable for her?
Notepad
Vim
Visual Studio Code
Python interpreter
Correct answer
Visual Studio Code
You see unexpected behavior in a GUI application and trace the function calls and state transitions starting from the button click that triggered the event. Which debugging strategy is most appropriate?
Input manipulation
Forward tracing
Backward tracing
Blackbox debugging
Correct answer
Forward tracing
Your system supports an "Add to Cart and Purchase" workflow. To model how different objects interact during this process, which UML diagram would be most appropriate?
Class Diagram
Sequence Diagram
Activity Diagram
Component Diagram
Correct answer
Sequence Diagram
Imagine you're joining a new open-source project hosted on GitHub. You want to make some improvements in the codebase and share your changes with the rest of the team. Starting from scratch, what is the correct order of steps you should follow to make changes locally and push them to the remote repository?
Add → Commit → Push → Clone
Clone → Modify → Add → Commit → Push
Fork → Commit → Pull → Push
Push → Clone → Add → Merge
Correct answer
Clone → Modify → Add → Commit → Push