Blog
Software Engineering Past Paper 2014 – MSc IT 2nd Term UOS (CMP-3310)
University of Sargodha MSc IT 2nd term Software Engineering (CMP-3310) paper, 2014 exam, session 2013-15 (80 marks, 2:30 hours). The paper is retyped below, followed by solved answers for all 16 short questions and all long questions: project management life cycle, fundamental design concepts, agile vs formal methods, requirement elicitation techniques, refactoring and re-engineering.
Solved answers
Q1 – Short answers (16 × 2)
i. Fundamental activities of software process. Software specification, software design and implementation (development), software validation and software evolution (Sommerville). Pressman’s framework: communication, planning, modelling, construction, deployment.
ii. Phases of RUP. Inception, Elaboration, Construction and Transition.
iii. Drawbacks of spiral model. Complex and costly; needs considerable risk-assessment expertise; hard to convince customers it is controllable; not suitable for small, low-risk projects; may continue indefinitely.
iv. Proactive vs reactive risk strategies. Reactive (“fire-fighting”) – the team deals with risks only after they become problems. Proactive – risks are identified, assessed and ranked in advance, and plans for mitigation, monitoring and management (RMMM) are prepared before work begins.
v. Properties of good requirements. Correct, complete, unambiguous, consistent, verifiable, feasible, traceable, modifiable and ranked for importance.
vi. Functional vs non-functional requirements. Functional requirements describe what the system should do – services and functions (e.g. “a user can search books by title”). Non-functional requirements are constraints or qualities – performance, security, reliability, usability, portability (e.g. “search results within 2 seconds”).
vii. Two ways to estimate project size. Lines of code (LOC) estimation and function point (FP) analysis; (also decomposition-based and empirical models such as COCOMO).
viii. Modularity. Dividing software into separately named and addressable components (modules) that are integrated to satisfy requirements; it makes a program intellectually manageable, but too many modules raise integration cost.
ix. Cohesion and coupling. Cohesion is the degree to which the elements inside one module belong together (one module, one job) – high cohesion is desired. Coupling is the degree of interdependence between modules – low (loose) coupling is desired, so a change in one module does not ripple into others.
x. Software architecture design. The high-level structure of a system – its components, their externally visible properties and relationships – e.g. layered, client-server, pipe-and-filter, MVC styles.
xi. Refactoring vs refinement. Refinement is a top-down elaboration process – progressively adding detail to a high-level abstraction (stepwise refinement). Refactoring changes the internal structure of existing code/design to improve it without changing its external behaviour.
xii. Verification vs validation. Verification asks “Are we building the product right?” – checking that work products meet their specifications (reviews, inspections, walkthroughs, static analysis). Validation asks “Are we building the right product?” – checking that the finished software meets the user’s real needs (testing, acceptance testing).
xiii. Testing vs debugging. Testing is executing a program to find errors (shows that defects exist); it is planned and can be done by testers. Debugging is locating and correcting the cause of a found error; it is done by developers and is less predictable.
xiv. 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.
xv. Quality and standards. Standards (ISO 9001, IEEE) define best practices for products and processes; following them makes quality consistent and measurable, and quality assurance checks conformance to these standards.
xvi. Why we use CMM. To assess the maturity of an organization’s software process, identify weaknesses, guide step-by-step process improvement and give customers confidence in a contractor’s capability.
Q2 – Project management and project management life cycle
Project management is the application of knowledge, skills, tools and techniques to project activities to meet project requirements – delivering software on time, within budget and with required quality. It focuses on the 4 P’s: people, product, process and project.
Project management life cycle
- Initiation – define the project at a broad level: business case, feasibility study, project charter, identify stakeholders, appoint the project manager.
- Planning – define scope and WBS, estimate size, effort and cost (LOC/FP, COCOMO), schedule (Gantt, PERT/CPM), staffing, risk management plan, quality and communication plans.
- Execution – the team carries out the planned work: requirements, design, coding, testing; resources are allocated and deliverables produced.
- Monitoring and controlling – track progress against the plan (milestones, earned value), manage changes, control risks and quality, report status, and take corrective action.
- Closure – deliver the product, obtain acceptance, release resources, close contracts, document lessons learned (post-mortem).
Q3 – Fundamental software design concepts
- Abstraction – focusing on essential details at each level; procedural and data abstraction.
- Architecture – the overall structure of components and their interactions.
- Patterns – proven solutions to recurring design problems.
- Separation of concerns – dividing a complex problem into independently solvable pieces.
- Modularity – dividing software into separately named, addressable modules.
- Information hiding – modules hide internal details (data and algorithms) and expose only interfaces.
- Functional independence – modules with high cohesion and low coupling.
- Refinement – stepwise elaboration from high-level to detailed design.
- Aspects – crosscutting concerns (e.g. security, logging) handled separately.
- Refactoring – improving internal structure without changing behaviour.
- Object-oriented design concepts – classes, objects, inheritance, messages, polymorphism.
- Design classes – user-interface, business-domain, process, persistent and system classes.
These concepts help produce designs that are understandable, maintainable, testable and reusable.
Q4 – Agile software development vs formal methods
| Aspect | Agile development | Formal methods |
|---|---|---|
| Basis | Agile Manifesto values – individuals, working software, collaboration, responding to change | Mathematical specification and verification (set theory, logic – Z, VDM, B) |
| Requirements | Informal user stories, evolve over time | Precise, complete formal specification |
| Documentation | Minimal | Extensive formal documents and proofs |
| Verification | Testing, continuous integration | Mathematical proof of correctness, model checking |
| Change | Welcomes change | Change is expensive – specification and proofs must be redone |
| Speed and cost | Fast, low initial cost | Slow, expensive, needs trained specialists |
| Customer | Continuous involvement | Hard for customers to understand notation |
| Suitable for | Business/web apps with changing requirements | Safety- and security-critical systems (railway, avionics, medical) |
Similarities: both aim at high quality and early defect removal. Contrast: agile relies on people and feedback to reach quality quickly, while formal methods rely on mathematical rigour to guarantee correctness. They can be combined – e.g. lightweight formal specification of critical components within an agile project.
Q5 – Requirement elicitation and techniques
Requirements elicitation is the process of discovering requirements from customers, users and other stakeholders – understanding the application domain, the services the system must provide and its constraints. Problems include stakeholders not knowing what they want, using their own terms, conflicting requirements and changing requirements.
Techniques
- Interviews – closed (predefined questions) or open (free discussion) interviews with stakeholders; good for understanding what they do, but users may find it hard to describe their work.
- Questionnaires/surveys – reach many users quickly.
- Collaborative requirements gathering / JAD workshops / brainstorming – developers and customers meet with a facilitator, propose and refine lists of objects, services and constraints, then build mini-specifications.
- Quality Function Deployment (QFD) – translates customer needs into normal, expected and exciting requirements.
- Observation and ethnography – an analyst observes users in their real work environment to discover implicit requirements.
- Scenarios and use cases / user stories – real-life examples of interaction that stakeholders can easily understand and critique.
- Prototyping – an early version lets users try ideas and clarify requirements.
- Document and existing-system analysis.
Elicitation work products include a statement of need and feasibility, scope, list of stakeholders, description of the technical environment, a list of requirements with constraints, and usage scenarios.
Q6 (a) – Why refactoring plays an important role in design
- Removes redundancy, unused design elements, inefficient algorithms and poorly constructed data structures.
- Improves cohesion and reduces coupling, making the design easier to understand and modify.
- Keeps the design simple as the code evolves – essential in XP and agile, where design emerges incrementally.
- Reduces technical debt and makes adding new features cheaper.
- Done in small steps, supported by unit tests, so behaviour is preserved.
- Common refactorings: extract method/class, rename, move method, replace conditional with polymorphism.
Q6 (b) – Re-engineering
Software re-engineering is restructuring or rewriting part or all of a legacy system without changing its functionality, to make it easier to maintain or to move it to a new technology. It is chosen when the system is still valuable but costly to maintain.
Software re-engineering process model (cyclic): inventory analysis (identify candidate applications) → document restructuring → reverse engineering (recover design and specification from code) → code restructuring → data restructuring → forward engineering (rebuild using modern methods).
Advantages: lower risk and cost than complete redevelopment; preserves business rules. Business process re-engineering (BPR) applies the same idea to business processes.
