Blog
Software Engineering Past Paper 2015 – MSc IT 2nd Term UOS (CMP-3310)
University of Sargodha MSc IT 2nd term Software Engineering (CMP-3310) paper, 2015 exam, new scheme (80 marks, 2:30 hours). Both scanned pages are retyped below (the last page of the original, which continued the iterative-model text of Q7, is missing), followed by solved answers for all 16 short questions and all long questions: structured analysis and design, Unified Process, validation testing, SafeHome activity diagram, statistical SQA, debugging, agile vs structured and the waterfall vs iterative comparison.
Solved answers
Q1 – Short answers (16 × 2)
1. Software. Computer programs together with associated documentation and configuration data needed to make them operate correctly; software products may be generic or customized.
2. Attributes of good software. Maintainability, dependability (reliability, security, safety), efficiency (performance, resource use) and usability/acceptability; also functionality, portability and correctness.
3. Drawbacks of waterfall model. Inflexible to changing requirements; working software appears late; customer must state all requirements at the start; errors discovered late are costly; real projects rarely follow a strict sequence; blocking states for team members.
4. Spiral vs incremental model. The incremental model delivers the system in a series of planned functional increments, each a usable product. The spiral model is risk-driven – each loop includes explicit risk analysis and produces progressively more complete versions (prototype → product); it suits large, high-risk projects.
5. Cost of change in agility. In conventional processes the cost of change rises steeply (non-linearly) as the project progresses. Agile practices – incremental delivery, continuous testing, refactoring, pair programming – flatten this curve so that late changes cost much less.
6. Extreme programming. Extreme Programming (XP) is an agile method based on values of communication, simplicity, feedback, courage and respect; practices include user stories, the planning game, small releases, simple design, test-first development, pair programming, refactoring, continuous integration and an on-site customer.
7. Activity and swim-lane diagram. An activity diagram (UML) shows the flow of activities/actions in a scenario with decisions, forks and joins (like a flowchart). A swim-lane diagram is an activity diagram partitioned into vertical lanes, each showing which actor or class is responsible for each activity.
8. What class-based modelling represents. The objects the system will manipulate, the operations (methods) applied to them, relationships (associations, inheritance) between objects and the collaborations between classes – using class diagrams and CRC cards.
9. Class types in analysis classes. External entities, things, occurrences/events, roles, organizational units, places and structures (Pressman); in the boundary-control-entity view: entity, boundary and controller classes.
10. Control specification vs process specification. A control specification (CSPEC) describes the behaviour of the system in response to events/control signals – state diagrams and decision tables. A process specification (PSPEC) describes the processing/algorithm of each bottom-level process in the DFD.
11. Information system vs automated information system. An information system is any organized combination of people, procedures, data and resources that collects, processes and provides information (it may be manual). An automated information system performs these functions using computer hardware and software.
12. Responsibilities of a system analyst. Studying business problems, gathering and analysing requirements, feasibility study, modelling and designing the system, communicating between users and developers, preparing specifications, supporting testing and implementation.
13. Conventional vs object-oriented testing. Conventional testing focuses on functions/modules and algorithmic detail and integrates top-down or bottom-up. OO testing treats the class as the unit (testing operations together with state), uses thread-based and use-based integration, and must handle inheritance, encapsulation and polymorphism.
14. Debugging process. Executing test cases, comparing results, observing symptoms, locating the cause by brute force, backtracking or cause elimination, correcting it and running regression tests.
15. SWOT analysis. SWOT analysis is a strategic planning tool that examines Strengths and Weaknesses (internal) and Opportunities and Threats (external) of a project, product or organization.
16. White-box vs black-box testing. Black-box testing tests functionality from the specification without looking at the code (equivalence partitioning, boundary value analysis); usually done by testers. White-box (glass-box) testing uses knowledge of the internal code and logic to design tests (statement, branch, path coverage, basis-path testing); usually done by developers.
Q2 – Structured analysis and design
Structured analysis and design (SSAD) is a traditional, process-oriented approach in which the system is viewed as data flowing through processes. Analysis builds models of what the system must do; design converts them into a modular program structure (structure charts).
Goals: describe what the customer requires; establish a basis for the software design; define a set of requirements that can be validated once the software is built; improve communication through graphical models; reduce complexity by top-down decomposition.
Elements (analysis model):
- Data dictionary – the core repository describing all data objects.
- Entity-relationship diagram (ERD) – data modelling: entities, attributes and relationships.
- Data flow diagram (DFD) – functional modelling: processes, data flows, data stores and external entities, levelled from context diagram (level 0) downward.
- Process specification (PSPEC) – description of each bottom-level process.
- State-transition diagram and control specification (CSPEC) – behavioural modelling.
- Structure charts – in design, the modular hierarchy obtained by transform or transaction mapping from the DFD.
Advantages: easy-to-understand graphical models for users; clear top-down decomposition; well-documented and disciplined; good for process-intensive and data-processing systems; early error detection through reviews; established tools and techniques. (Limitation: data and processes are separated, so reuse and change are harder than in OO.)
Q3 (a) – Unified Process model and its phases
The Unified Process (UP/RUP) is a use-case driven, architecture-centric, iterative and incremental process with four phases – Inception, Elaboration, Construction, Transition – each made of iterations across workflows (requirements, analysis, design, implementation, test).
- Inception – customer communication and planning: business case, scope, preliminary use cases, risks, rough plan and architecture.
- Elaboration – refines and expands use cases; builds the architectural baseline (use-case, analysis, design, implementation and deployment models); revises plan and risks.
- Construction – develops and tests the software components for all use cases; unit and integration testing; produces a beta release.
- Transition – beta testing by users, user manuals, training, installation and correction of defects; delivers the release.
- Production (Pressman adds) – ongoing use is monitored, support provided, defects reported and changes evaluated.
Q3 (b) – Validation testing and its types
Validation testing begins after integration testing and checks that the software functions in a manner reasonably expected by the customer, i.e. it satisfies all requirements in the SRS (functional, behavioural, performance, documentation, usability).
- Validation test criteria – black-box tests based on a test plan derived from requirements; deviations are listed.
- Configuration review (audit) – ensures all elements of the software configuration are properly developed and catalogued.
- Alpha testing – by end users at the developer’s site in a controlled environment.
- Beta testing – by end users at their own sites without the developer present; problems reported back.
- Acceptance testing – by the customer for custom software to decide whether to accept the system (can be formal over weeks or months).
Q4 (a) – Activity diagram of SafeHome system
Activity diagram for the SafeHome “access camera surveillance via the Internet / enter password” scenario:
( start )
|
[Enter password and user ID]
|
< valid password/ID? > --no--> [Display error / prompt re-entry]
| |
yes < attempts > 3? > --yes--> [Lock system, alert owner] --> (end)
| | no
|<----------------------------------+
[Select major function]
|
< function? >
| | |
[arm/disarm] [other functions] [surveillance]
| |
[Activate/deactivate [Select camera from floor plan / thumbnails]
sensors] |
| [View camera output in window]
| |
| < another camera? > --yes--> back to Select camera
| | no
+------------+-------------+
|
[Log out]
|
( end )Rounded rectangles are activities, diamonds are decisions, arrows show flow; swim lanes could separate Homeowner, Camera and Interface responsibilities.
Q4 (b) – Steps in statistical software quality assurance
- Information about software errors and defects is collected and categorized (e.g. incomplete specification, misinterpretation of customer communication, deviation from standards, error in data representation, inconsistent interface, design logic error, incomplete testing…).
- An attempt is made to trace each error and defect to its underlying cause.
- Using the Pareto principle (80% of defects can be traced to 20% of all possible causes), isolate the “vital few” causes.
- Once the vital few causes are identified, move to correct the problems that caused the errors and defects (improve the process).
Six Sigma (DMAIC – define, measure, analyse, improve, control) is a widely used statistical SQA strategy.
Q5 – Debugging process, difficulty and strategies
Debugging is the process of finding the cause of an error revealed by testing and removing it. Testing shows that an error exists; debugging locates and corrects it.
The debugging process: test cases are executed → results are compared with expected results → when they differ, symptoms are observed → suspected causes are identified → additional tests confirm the cause → corrections are made → regression tests are run to ensure the fix works and has not introduced new errors.
Why debugging is difficult
- The symptom and the cause may be in different, remote parts of the program (especially in highly coupled code).
- The symptom may disappear temporarily when another error is corrected.
- The symptom may be caused by non-errors such as round-off inaccuracies.
- It may be caused by human error that is hard to trace, or by timing problems rather than logic.
- Input conditions may be hard to reproduce (real-time and embedded systems).
- Symptoms may be intermittent, or the cause distributed across several tasks on different processors.
Debugging strategies
- Brute force – memory dumps, run-time traces and print statements everywhere; the least efficient but most common.
- Backtracking – start where the symptom appears and trace backward through the code until the cause is found; good for small programs.
- Cause elimination – induction or deduction: form hypotheses of possible causes and design tests to eliminate them one by one (binary partitioning).
- Automated debugging – debuggers with breakpoints and watches, static analysers and IDE tools; also asking a colleague (fresh view).
Q6 (a) – Structured development vs agile development
| Aspect | Structured (plan-driven) | Agile |
|---|---|---|
| Process | Sequential phases, heavy up-front planning | Iterative, short increments, adaptive planning |
| Requirements | Fixed and fully documented at start | Evolving user stories; change welcomed |
| Documentation | Comprehensive (SRS, DFDs, design docs) | Minimal; working software preferred |
| Customer involvement | Mainly at start and at acceptance | Continuous collaboration |
| Delivery | One delivery at the end | Frequent working releases |
| Team | Hierarchical roles | Small self-organizing teams |
| Best for | Stable requirements, large/critical systems | Changing requirements, small-medium teams |
Q6 (b) – Two agile process models
1. Extreme Programming (XP) – four framework activities in each iteration:
Planning (user stories, values, Design (KIS, CRC cards,
acceptance tests, iteration plan) --> spike solutions, prototypes)
^ |
| v
Test (unit tests, continuous Coding (pair programming,
integration, acceptance tests) <-- refactoring, test-first)
|
+--> software increment, project velocity computedValues: communication, simplicity, feedback, courage, respect. Key practices: pair programming, test-first, refactoring, continuous integration, small releases.
2. Scrum – work is done in sprints (2–4 weeks):
Product backlog --> Sprint planning --> Sprint backlog --> SPRINT (2-4 weeks,
(prioritized by daily 15-min Scrum meeting)
Product Owner) |
v
Sprint retrospective <-- Sprint review/demo <-- Potentially shippable incrementRoles: Product Owner, Scrum Master, Development Team. Daily Scrum answers: What did you do since the last meeting? What obstacles are you facing? What will you do before the next meeting?
Q7 – Waterfall vs iterative model: comparison
| Aspect | Waterfall model | Iterative model |
|---|---|---|
| Flow | Linear-sequential; a phase starts only when the previous one is complete | Repeated cycles; each iteration produces a new version |
| Requirements | All gathered and frozen at the start | Start with a subset; further requirements identified after each review |
| Working software | Available only at the end | Early – a simple version after the first iteration |
| Change | Difficult and costly after the phase is complete | Design modifications and new features added in every iteration |
| Risk | High; problems found late in testing | Lower; risks and defects found early in each iteration |
| Customer feedback | Only at the end | After every iteration |
| Management | Simple, clear milestones and documentation | Needs more planning and management effort per iteration |
| Suitable for | Small/short projects with clear, stable requirements and known technology | Large projects, unclear or changing requirements, need for early delivery |
Which is better and why? For most modern projects the iterative model is better, because requirements are rarely complete at the start: it gives early working versions, uses feedback to discover further requirements, accommodates change and reduces risk by finding problems early. The waterfall model is better only when requirements are fixed and well understood, the project is short and the technology is stable, because then its simplicity and documentation are advantages.
