Software Engineering · End Term · Sep 2025 · FN
Software Engineering · End Term · Sep 2025 FN
← Course papers · Start practice / exam
Questions and published explanations below are available without starting a test. Some questions may not have a published solution yet.
25 / 25 published solutions
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
**1. Exercise the true branch:** With x=5,y=10, x<y holds and min=x runs.
**2. Exercise the false branch:** With x=15,y=10, the else branch min=y runs. Both executions are needed for branch coverage.
**Answer: C — Both (5,10) and (15,10).**
A: **Incorrect:** It covers only the true branch.
B: **Incorrect:** It covers only the false branch.
C: **Correct:** Together the two inputs traverse both alternatives.
D: **Incorrect:** Equality only exercises the false branch.
Question 3 MCQ · 4.0 marks
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
Published solution
**1. Identify the key property:** Customer acceptance testing determines whether the delivered product meets agreed requirements sufficiently to approve it.
**Answer: B — Acceptance testing.**
A: **Incorrect:** Alpha testing is controlled prerelease testing rather than the approval decision.
B: **Correct:** The customer checks readiness for acceptance.
C: **Incorrect:** Smoke tests quickly check basic build viability.
D: **Incorrect:** System testing examines the whole system but does not specifically mean customer sign-off.
Question 4 MCQ · 4.0 marks
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
Published solution
**1. Identify the key property:** Top-down integration starts with the main control logic and uses stubs for lower-level modules that are not yet ready.
**Answer: B — Top-down.**
A: **Incorrect:** Bottom-up starts with low-level components and often uses drivers.
B: **Correct:** Top-down permits testing the main logic before lower modules exist.
C: **Incorrect:** Big-bang waits until components are available to combine.
D: **Incorrect:** Mixed integration is broader; top-down directly describes the stated objective.
Question 5 MCQ · 4.0 marks
What is the cyclomatic complexity of the following Python function?
2
3
4
5
Published solution
**1. Count decisions:** The for loop contributes one; the if and two elif tests contribute three more.
**2. Add the base path:** \(V=4+1=5\). Else itself is not another decision.
**Answer: D — 5.**
A: **Incorrect:** The stated structure gives 5, rather than 2.
B: **Incorrect:** The stated structure gives 5, rather than 3.
C: **Incorrect:** The stated structure gives 5, rather than 4.
D: **Correct:** This equals the independently counted result 5.
Question 6 MCQ · 4.0 marks
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
Published solution
**1. Separate invalid cases:** Non-integer inputs and negative integers are two distinct invalid-input classes.
**2. Separate valid categories:** Integer ages 0–12 are child, 13–59 adult, and 60 or higher senior. This gives three valid classes and two invalid classes, or five total.
**Answer: C — 5.**
**Convention note:** The supplied Python isinstance check accepts booleans as integers because bool is an int subclass; they follow the child branch. A stricter domain specification could choose to reject them.
A: **Incorrect:** The stated structure gives 5, rather than 3.
B: **Incorrect:** The stated structure gives 5, rather than 4.
C: **Correct:** This equals the independently counted result 5.
D: **Incorrect:** The stated structure gives 5, rather than 6.
Question 7 MCQ · 4.0 marks
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
Published solution
**1. Identify the key property:** Builder supplies a readable construction process for objects with many optional parameters.
**Answer: B — Builder Pattern.**
A: **Incorrect:** Factory selects or creates types but does not directly address numerous optional settings.
B: **Correct:** Named builder steps avoid a large or telescoping constructor.
C: **Incorrect:** Facade unifies a subsystem interface.
D: **Incorrect:** Adapter converts an interface.
Question 8 MCQ · 4.0 marks
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
Published solution
**1. Identify the key property:** Every new customer type requires editing existing discount logic. Open-Closed instead encourages extension through new implementations while keeping established code unchanged.
**Answer: C — Open-Closed Principle.**
A: **Incorrect:** ISP concerns clients depending on unused interface methods.
B: **Incorrect:** Dependency Inversion concerns depending on abstractions.
C: **Correct:** Adding behaviour requires modifying the existing method, contrary to the stated extension goal.
D: **Incorrect:** Liskov concerns behavioural compatibility of subtypes.
Question 9 MCQ · 4.0 marks
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
Published solution
**1. Identify the precise UML relationship:** UPIPayment implements the contract declared by PaymentMethod. This is interface realization.
**2. Match the broad listed categories:** In UML, realization specializes abstraction, which is a kind of dependency. Thus Dependency is the intended broad option when Realization is absent.
**Answer: C — Dependency, specifically interface realization.**
**Convention note:** The most precise UML label would be Interface Realization; the offered answer uses its broader dependency category.
A: **Incorrect:** Generalization/class inheritance is distinct from UML interface realization, although implementation also creates a type-subtyping relation.
B: **Incorrect:** No contained part object is specified.
C: **Correct:** The precise realization relationship belongs to the UML dependency family.
D: **Incorrect:** No whole–part aggregation is specified.
Question 10 MCQ · 4.0 marks
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
Published solution
**1. Identify the key property:** The module groups functions with no shared purpose or data. That is coincidental cohesion, the weakest grouping.
**Answer: D — Coincidental cohesion.**
A: **Incorrect:** Functional cohesion requires a single focused goal.
B: **Incorrect:** Sequential cohesion requires one operation’s output to feed another.
C: **Incorrect:** Procedural cohesion at least shares a control sequence.
D: **Correct:** The functions are unrelated and grouped arbitrarily.
Question 11 MSQ · 4.0 marks
Which of the following activities occur after a sprint is completed?
Sprint planning
Sprint review
Daily stand-up
Sprint retrospective
Published solution
**1. Identify sprint-closing events:** The Sprint Review inspects the increment with stakeholders; the Sprint Retrospective inspects and improves the team’s process.
**Answer: B, D — Sprint Review and Sprint Retrospective.**
**Convention note:** In formal Scrum terminology the Review and Retrospective are concluding events within the sprint, not events after the sprint has already ended.
A: **Incorrect:** Planning begins the next sprint rather than reviews the just-completed work.
B: **Correct:** Review inspects the completed increment.
C: **Incorrect:** Daily Scrum occurs throughout the sprint, not just at its close.
D: **Correct:** Retrospective improves the process after inspecting the sprint.
Question 12 MSQ · 4.0 marks
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
Published solution
**1. Read the network’s purpose:** Activities are linked by precedence dependencies and annotated with durations. This supports parallel-work and schedule analysis but complements rather than replaces a WBS.
**Answer: A, D — Parallel-work identification, dependencies and durations.**
A: **Correct:** Unlinked precedence branches identify tasks that can proceed in parallel.
B: **Incorrect:** A WBS defines work decomposition; the network adds schedule relationships.
C: **Incorrect:** Cost annotations may be added, but they are not the defining information in the stated activity network.
D: **Correct:** Dependencies and durations are represented explicitly.
Question 13 MCQ · 4.0 marks
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
Published solution
**1. Compute probability–impact scores:** \(0.2(2)=0.4\), \(0.8(3)=2.4\), \(0.5(4)=2.0\), \(0.9(3)=2.7\).
**2. Choose the maximum:** 90% probability with impact 3 has the largest score, 2.7.
**Answer: D — Probability 90%, impact 3.**
A: **Incorrect:** Its score is only 0.4.
B: **Incorrect:** Its score 2.4 is below 2.7.
C: **Incorrect:** Its score 2.0 is below 2.7.
D: **Correct:** Its score 2.7 is the largest.
Question 14 MCQ · 4.0 marks
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
Published solution
**1. Identify the key property:** The same action has the same location, label and icon across screens. These stable conventions demonstrate consistency.
**Answer: C — Consistency.**
A: **Incorrect:** No expert shortcut or alternative workflow is described.
B: **Incorrect:** A familiar metaphor is not the central repeated-screen property.
C: **Correct:** The representation and placement stay uniform across screens.
D: **Incorrect:** No feedback about current system state is described.
Question 15 MCQ · 4.0 marks
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
Published solution
**1. Identify the key property:** Returning users can resume work after a gap because the familiar interface is easy to remember. This is memorability.
**Answer: D — Memorability.**
A: **Incorrect:** Effectiveness concerns achieving a goal.
B: **Incorrect:** Efficiency concerns time and effort during use.
C: **Incorrect:** Learnability concerns initial learning.
D: **Correct:** The scenario specifically concerns remembering how to use the app after time away.
Question 16 MCQ · 4.0 marks
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
Published solution
**1. Identify the key property:** A sketch makes an unclear feature tangible so stakeholders can understand and refine its purpose.
**Answer: B — Clarifies vague requirements.**
A: **Incorrect:** A sketch does not demonstrate optimized runtime performance.
B: **Correct:** The prototype clarifies uncertain requirements.
C: **Incorrect:** No final implementation is being tested.
D: **Incorrect:** The sketch facilitates feedback rather than removes its need.
Question 17 MCQ · 4.0 marks
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
Published solution
**1. Classify capability:** Filtering products by category is a function the user can perform.
**2. Classify quality constraints:** Loading within two seconds is performance; supporting 1000 concurrent users is a capacity/scalability constraint. Both are non-functional.
**Answer: C — 1 functional; 2 and 3 non-functional.**
A: **Incorrect:** Concurrent-user capacity is non-functional rather than functional.
B: **Incorrect:** Filtering is functional and the loading-time bound is non-functional.
C: **Correct:** The capability is functional, while time and capacity are quality constraints.
D: **Incorrect:** The loading-time bound is a non-functional performance constraint.
Question 18 MCQ · 4.0 marks
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
Published solution
**1. Identify the key property:** A joint discussion among stakeholders reveals agreements and differences in their requirements. That is a focus group.
**Answer: B — Focus Group.**
A: **Incorrect:** A questionnaire collects individual written responses.
B: **Correct:** Group interaction exposes differing stakeholder needs.
C: **Incorrect:** Observation watches work in its natural setting.
D: **Incorrect:** A structured interview follows a fixed question script rather than emphasizes joint stakeholder discussion.
Question 19 MCQ · 4.0 marks
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
Published solution
**1. Identify the key property:** Architectural structure and stable intercomponent interfaces should be agreed during design. Skipping this creates incompatible function-signature changes.
**Answer: C — Design.**
A: **Incorrect:** Requirements gathering establishes needed capabilities but is not the direct phase for module-interface design.
B: **Incorrect:** Testing detects defects rather than defines the common structure.
C: **Correct:** The missing architecture and interface contracts are design work.
D: **Incorrect:** Maintenance follows release, whereas this problem occurs during initial development.
Question 20 MCQ · 4.0 marks
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
Published solution
**1. Identify the key property:** Among the given options, dedicated bare-metal hardware provides direct system control and avoids sharing or virtualization overhead, matching the stated willingness to pay for a dedicated setup.
**Answer: D — Bare Metal Server.**
A: **Incorrect:** PaaS hides infrastructure details and limits full system control.
B: **Incorrect:** IaaS commonly supplies virtualized infrastructure rather than dedicated bare metal.
C: **Incorrect:** Shared hosting conflicts with dedicated resources and full control.
D: **Correct:** Dedicated physical hardware best matches the scenario’s priorities.
Question 21 MCQ · 4.0 marks
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
Published solution
**1. Identify the key property:** Blue-green deployment keeps the old and new environments available and changes which receives production traffic. Switching traffic back provides fast application-version rollback.
**Answer: B — Blue-Green Deployment.**
**Convention note:** Rapid traffic rollback assumes the old environment remains healthy and shared data/schema changes remain backward-compatible.
A: **Incorrect:** Canary rolls out to subsets of users rather than primarily maintaining two full traffic-switch environments.
B: **Correct:** Both environments are retained so traffic can be redirected to the previous one.
C: **Incorrect:** “Version deployment” is not the specific two-environment strategy.
D: **Incorrect:** Shadow deployment mirrors traffic for observation without serving the new results to users.
Question 22 MCQ · 4.0 marks
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
Published solution
**1. Identify the key property:** Identifying customer segments and discovering valuable market features primarily concerns marketing and market research among the listed teams.
**Answer: B — Marketing Team.**
A: **Incorrect:** Engineering mainly implements the product and assesses technical feasibility.
B: **Correct:** Marketing investigates the audience, demand and product positioning.
C: **Incorrect:** Support mainly assists existing users and supplies feedback.
D: **Incorrect:** Legal handles obligations and legal risk rather than owns audience research.
Question 23 MCQ · 4.0 marks
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
Published solution
**1. Identify the key property:** VS Code with Python language tooling supports diagnostics, symbol navigation and project-wide renaming, matching the requested editor assistance.
**Answer: C — Visual Studio Code.**
A: **Incorrect:** Plain Notepad lacks the specified code-aware tooling.
B: **Incorrect:** Vim can be extended to support this, but no plugin configuration is specified.
C: **Correct:** With Python language tooling, it provides the requested code-aware editing features.
D: **Incorrect:** An interpreter runs Python but is not a project-refactoring editor.
Question 24 MCQ · 4.0 marks
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
Published solution
**1. Identify the key property:** The trace starts at the triggering click and follows subsequent calls and states toward the unexpected behaviour. This is forward tracing.
**Answer: B — Forward tracing.**
A: **Incorrect:** Inputs are not being varied as the main technique.
B: **Correct:** The execution is followed from trigger to outcome.
C: **Incorrect:** Backward tracing would begin at the symptom and trace toward the trigger.
D: **Incorrect:** Internal calls and state transitions are examined, so it is not purely black-box.
Question 25 MCQ · 4.0 marks
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
Published solution
**1. Identify the key property:** The question asks how objects communicate during a specific workflow. A sequence diagram shows lifelines and messages in time order.
**Answer: B — Sequence Diagram.**
A: **Incorrect:** Class diagrams show static types and relationships.
B: **Correct:** Object interactions and ordered messages are represented directly.
C: **Incorrect:** Activity diagrams primarily show workflow/control rather than messages between object lifelines.
D: **Incorrect:** Component diagrams show structural components and interfaces.
Question 26 MCQ · 4.0 marks
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
Published solution
**1. Identify the key property:** Start with a local repository copy, edit files, stage the changes, record them in a commit, then push that commit to the remote.
**Answer: B — Clone → Modify → Add → Commit → Push.**
A: **Incorrect:** Cloning must precede staging and committing local changes.
B: **Correct:** This is the standard clone–edit–stage–commit–push sequence.
C: **Incorrect:** This omits cloning, editing and staging while inserting an unrelated pull order.
D: **Incorrect:** Pushing before a repository exists is not the stated workflow.