Blog
Software Engineering Past Paper 2015 – BS IT 4th Term UOS (CMP-3310)
University of Sargodha BS IT 4th term Software Engineering (CMP-3310) paper, 2015 exam (80 marks, 2:30 hours). The paper is retyped below, followed by solved answers for all 16 short questions and all long questions: waterfall and ASD, eliciting requirements, risk in the spiral model, structured vs OO analysis, interface design principles, testing types, a library system use-case and class diagram and the agility principles.
Solved answers
Q1 – Short answers (16 × 2)
1. Spike solution in XP. A small, throw-away program written to explore a difficult technical or design problem and reduce risk or improve an estimate before implementing a user story.
2. Software engineering. The application of a systematic, disciplined, quantifiable approach to the development, operation and maintenance of software (IEEE).
3. Why Crystal is a family of agile methods. Crystal (Alistair Cockburn) is a set of methods – Crystal Clear, Yellow, Orange, Red… – each tailored to team size and project criticality; all share the same core values (people, communication, frequent delivery) but differ in practices and ceremony.
4. CMM. The Capability Maturity Model (SEI) assesses how mature an organization’s software process is on five levels – Initial, Repeatable, Defined, Managed, Optimizing – and guides process improvement. CMMI (Capability Maturity Model Integration) is its integrated successor.
5. Component-based development. Building software by assembling pre-built, reusable components with well-defined interfaces (COTS or in-house) instead of writing everything from scratch.
6. Legacy software. Older software systems, often developed decades ago with outdated technology, that are still in use because they support critical business functions.
7. Umbrella activities. Activities applied throughout the process: project tracking and control, risk management, software quality assurance, technical reviews, measurement, software configuration management, reusability management, work-product preparation.
8. Why old legacy systems are still used. They are business-critical and contain years of business rules; replacing them is expensive and risky, documentation is often missing, and they still work – so organizations maintain or re-engineer them instead.
9. Requirements engineering. The process of establishing the services a customer requires and the constraints: inception, elicitation, elaboration, negotiation, specification, validation and requirements management.
10. Process specification. A description of each bottom-level process (bubble) in a data flow diagram – its inputs, algorithm/logic, outputs and constraints – written in structured English, decision tables or pseudocode.
11. Purpose of configuration model. It shows how software components are deployed on hardware nodes (deployment diagram) and/or identifies configuration items and their relationships for configuration management, so that versions and changes can be controlled.
12. Associations vs dependencies. An association is a structural relationship – objects of one class are connected to objects of another (e.g. Student enrolls in Course) and may have multiplicity. A dependency is a weaker “uses” relationship – a change in one class may affect another (e.g. a parameter type), shown by a dashed arrow.
13. Coupling/cohesion and module size. Very large modules tend to have low cohesion (many unrelated tasks), while too many tiny modules increase coupling and interface cost. Good modularity chooses a size where each module has high cohesion and low coupling.
14. Unified Process. 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).
15. 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.
16. 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).
Q2 – Waterfall model and Adaptive Software Development
Waterfall model – the classic linear sequential life cycle: Requirements analysis → System and software design → Implementation and unit testing → Integration and system testing → Operation and maintenance. Each phase produces signed-off documents and starts only when the previous phase is finished.
- Advantages: simple, easy to manage, well-documented, works well when requirements are stable and well understood (e.g. large engineering or government projects).
- Drawbacks: difficult to accommodate change after the process is under way; customers see a working version only late; real projects rarely follow a sequential flow; errors found late are expensive; blocking states where team members wait for others.
Adaptive Software Development (ASD) – an agile method by Jim Highsmith for complex systems, based on self-organization and collaboration. Its life cycle has three phases:
- Speculation – the project is initiated and adaptive cycle planning is done using the mission statement, constraints and basic requirements; release cycles are defined.
- Collaboration – motivated people work together, share knowledge and use JAD sessions; trust and communication are essential.
- Learning – after each cycle, learning happens through focus groups (customer feedback), formal technical reviews and postmortems, and plans are adapted.
ASD is mission-focused, feature-based, iterative, time-boxed, risk-driven and change-tolerant.
Q3 – Eliciting requirements
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.
Q4 (a) – Role of risk analysis in the spiral model
The spiral model (Boehm) combines the iterative nature of prototyping with the systematic aspects of the waterfall. Each loop of the spiral passes through four sectors: objective setting, risk assessment and reduction, development and validation, and planning the next loop. It is risk-driven and suitable for large, high-risk projects.
- In each loop the risk assessment and reduction sector identifies project risks (technical, schedule, cost, requirements), analyses them and takes steps to reduce them – e.g. building a prototype to clarify unclear requirements or test performance.
- Risks decide what is done next and how much detail is needed; low-risk parts may follow a waterfall-like approach.
- At the end of each loop, the customer and team review results and decide whether to continue – the project can be stopped if risks are too high.
- Explicit risk management makes the spiral model suitable for large, high-risk systems.
Q4 (b) – Structured analysis vs object-oriented analysis
| Aspect | Structured analysis | Object-oriented analysis |
|---|---|---|
| Focus | Processes/functions and data flow | Objects (data + behaviour) and their interactions |
| Models | DFD, ERD, data dictionary, process specification, STD | Use case, class, sequence, activity and state diagrams (UML) |
| Decomposition | Top-down functional decomposition | Classes, inheritance and responsibilities |
| Data and process | Kept separate | Encapsulated together |
| Reuse and change | Less reuse; changes in function affect many parts | High reuse; changes localised in classes |
| Suitable for | Process-oriented, smaller, stable systems | Large, complex, evolving systems |
Q5 – Interface design principles
Mandel’s three golden rules:
- Place the user in control – avoid forcing unnecessary actions; flexible interaction (mouse, keyboard, voice); allow interruption and undo; hide technical internals; direct manipulation of objects on screen.
- Reduce the user’s memory load – meaningful defaults; intuitive shortcuts; real-world metaphors; show information progressively; recognition rather than recall.
- Make the interface consistent – same look and behaviour across screens; follow platform conventions; keep previous interactive models users expect (e.g. Ctrl+S to save).
Other principles: visibility and feedback for every action, error prevention and clear error messages, simplicity and aesthetic design, accessibility, and help and documentation.
Q6 – Testing types
- Unit testing – testing individual components (functions, classes) in isolation, usually by the developer using white-box techniques, drivers and stubs.
- Integration testing – testing combined modules to find interface errors; approaches: top-down, bottom-up, sandwich and big-bang.
- System testing – testing the complete integrated system against requirements, including performance, security, recovery and stress tests.
- Alpha testing – acceptance testing by customers/end users at the developer’s site in a controlled environment, with developers present.
- Beta testing – testing by real users at their own sites without developers present; users report problems before final release.
- Stress testing – running the system under abnormal loads (very high volume, many users, low memory) to find the breaking point and see how it fails and recovers.
- Regression testing – re-running earlier tests after changes or fixes to make sure no new defects have been introduced.
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.
Q7 (a) – Library management system: use case and class diagram
Actors: Librarian (manages books and readers, issues/returns books) and Reader (searches/views books, borrows and returns).
+-------------- Library Management System ---------------+
| |
Librarian ----->| (Add Book) (Update Book) (Delete Book) (Display Book) |
| | |
+---------->| (Add Reader) (Update Reader) (Delete Reader) |
| | (Display Reader) |
+---------->| (Issue/Borrow Book) ---<<include>>--> (Check Availability)
+---------->| (Return Book) ---<<extend>>--> (Calculate Fine) |
| |
Reader -------->| (Search Book) (Borrow Book) (Return Book) |
+---------------------------------------------------------+Class diagram
+-------------------------+ +---------------------------+
| Book | | Reader |
+-------------------------+ +---------------------------+
| - bookId : int | | - readerId : int |
| - title : String | | - name : String |
| - author : String | | - phone : String |
| - isbn : String | | - address : String |
| - copies : int | +---------------------------+
+-------------------------+ | + add() + update() |
| + add() + update() | | + delete() + display() |
| + delete() + display() | +-------------+-------------+
| + isAvailable() : bool | | 1
+-----------+-------------+ |
| 1 | 0..*
| 0..* +-------------------+--------+
+-----------------| Loan |
+----------------------------+
| - loanId : int |
| - issueDate : Date |
| - dueDate : Date |
| - returnDate : Date |
+----------------------------+
| + borrow() + returnBook() |
| + calculateFine() : double |
+----------------------------+
+---------------------------+
| Librarian | Librarian manages 0..* Book and 0..* Reader,
+---------------------------+ and records 0..* Loan
| - staffId : int |
| - name : String |
+---------------------------+
| + issueBook() + receiveBook()|
+---------------------------+A Reader can have many Loans; each Loan refers to exactly one Book and one Reader; a Book can appear in many Loans over time.
Q7 (b) – Agility principles (Agile Manifesto)
- Highest priority is to satisfy the customer through early and continuous delivery of valuable software.
- Welcome changing requirements, even late in development.
- Deliver working software frequently, from a couple of weeks to a couple of months.
- Business people and developers must work together daily.
- Build projects around motivated individuals; give them support and trust.
- Face-to-face conversation is the most efficient way of conveying information.
- Working software is the primary measure of progress.
- Agile processes promote sustainable development at a constant pace.
- Continuous attention to technical excellence and good design enhances agility.
- Simplicity – maximizing the amount of work not done – is essential.
- The best architectures, requirements and designs emerge from self-organizing teams.
- At regular intervals the team reflects on how to become more effective and adjusts its behaviour.
