MauryaHub PYQ Practice

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

Question 2 MCQ · 4.0 marks

Which of the following test cases ensures branch coverage for the Python code given below?
Source diagram or notation
6406536024760.
x = 5, y = 10
6406536024761.
x = 15, y = 10
6406536024762.
Both x = 5, y = 10 and x = 15, y = 10
6406536024763.
Only when x = y

Published solution

**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.

Report a correction for Q2

Question 3 MCQ · 4.0 marks

Which type of testing is carried out by the customer to decide whether to approve the product?
6406536024764.
Alpha testing
6406536024765.
Acceptance testing
6406536024766.
Smoke testing
6406536024767.
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.

Report a correction for Q3

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?
6406536024768.
Bottom-up
6406536024769.
Top-down
6406536024770.
Big bang
6406536024771.
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.

Report a correction for Q4

Question 5 MCQ · 4.0 marks

What is the cyclomatic complexity of the following Python function?
Source diagram or notation
6406536024772.
2
6406536024773.
3
6406536024774.
4
6406536024775.
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.

Report a correction for Q5

Question 6 MCQ · 4.0 marks

Consider the following Python function:
Source diagram or notation
From a blackbox testing perspective, how many input equivalence classes are appropriate for testing this function?
6406536024776.
3
6406536024777.
4
6406536024778.
5
6406536024779.
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.

Report a correction for Q6

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?
6406536024780.
Factory Pattern
6406536024781.
Builder Pattern
6406536024782.
Facade Pattern
6406536024783.
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.

Report a correction for Q7

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?
6406536024784.
Interface Segregation Principle
6406536024785.
Dependency Inversion Principle
6406536024786.
Open-Closed Principle
6406536024787.
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.

Report a correction for Q8

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?
6406536024788.
Inheritance
6406536024789.
Composition
6406536024790.
Dependency
6406536024791.
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.

Report a correction for Q9

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?
6406536024792.
Functional cohesion
6406536024793.
Sequential cohesion
6406536024794.
Procedural cohesion
6406536024795.
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.

Report a correction for Q10

Question 11 MSQ · 4.0 marks

Which of the following activities occur after a sprint is completed?
6406536024796.
Sprint planning
6406536024797.
Sprint review
6406536024798.
Daily stand-up
6406536024799.
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.

Report a correction for Q11

Question 12 MSQ · 4.0 marks

Which of the following are true regarding an Activity Network?
6406536024800.
It helps identify independent tasks that can be done in parallel
6406536024801.
It replaces the need for a Work Breakdown Structure
6406536024802.
It represents the estimated cost for each task
6406536024803.
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.

Report a correction for Q12

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?
6406536024804.
Probability: 20%, Impact: 2
6406536024805.
Probability: 80%, Impact: 3
6406536024806.
Probability: 50%, Impact: 4
6406536024807.
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.

Report a correction for Q13

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?
6406536024808.
Flexibility and efficiency of use
6406536024809.
Familiar metaphors
6406536024810.
Consistency
6406536024811.
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.

Report a correction for Q14

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?
6406536024812.
Effectiveness
6406536024813.
Efficiency
6406536024814.
Learnability
6406536024815.
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.

Report a correction for Q15

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?
6406536024816.
Ensures performance optimization
6406536024817.
Clarifies vague requirements
6406536024818.
Tests final implementation
6406536024819.
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.

Report a correction for Q16

Question 17 MCQ · 4.0 marks

Source diagram or notation
6406536024820.
1 and 3 is a functional, 2 is a nonfunctional requirement
6406536024821.
1 and 2 are nonfunctional, 3 is a functional requirement
6406536024822.
1 is a functional, 2 and 3 are nonfunctional requirements
6406536024823.
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.

Report a correction for Q17

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?
6406536024824.
Questionnaire
6406536024825.
Focus Group
6406536024826.
Observation
6406536024827.
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.

Report a correction for Q18

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?
6406536024828.
Requirement Gathering
6406536024829.
Testing
6406536024830.
Design
6406536024831.
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.

Report a correction for Q19

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?
6406536024832.
Platform as a Service (PaaS)
6406536024833.
Infrastructure as a Service (IaaS)
6406536024834.
Shared Hosting
6406536024835.
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.

Report a correction for Q20

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?
6406536024836.
Canary Deployment
6406536024837.
Blue-Green Deployment
6406536024838.
Version Deployment
6406536024839.
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.

Report a correction for Q21

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?
6406536024840.
Engineering Team
6406536024841.
Marketing Team
6406536024842.
Support Team
6406536024843.
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.

Report a correction for Q22

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?
6406536024844.
Notepad
6406536024845.
Vim
6406536024846.
Visual Studio Code
6406536024847.
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.

Report a correction for Q23

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?
6406536024848.
Input manipulation
6406536024849.
Forward tracing
6406536024850.
Backward tracing
6406536024851.
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.

Report a correction for Q24

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?
6406536024852.
Class Diagram
6406536024853.
Sequence Diagram
6406536024854.
Activity Diagram
6406536024855.
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.

Report a correction for Q25

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?
6406536024856.
Add → Commit → Push → Clone
6406536024857.
Clone → Modify → Add → Commit → Push
6406536024858.
Fork → Commit → Pull → Push
6406536024859.
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.

Report a correction for Q26