2079

BIT302 · TU past paper

Software Engineering 2079 question paper

The complete TU 2079 exam paper for Software Engineering (BIT302), all 13 questions with solved model answers written to the mark scheme.

Past Papers2082208120802079

Tap a question to open its answer.

  1. 110 marksEvent-driven modelingAnswer

    Describe event driven modeling. Explain the concept of event driven modeling with an example of your own.[10]

    Event-driven modeling is a system modeling approach that describes how a system responds to external and internal events (stimuli) by transitioning between different states. It focuses on what happens when an event occurs rather than on ...

  2. 210 marksPipe and filter architectureAnswer

    What is pipe and filter architecture? Explain with an example. What are its advantages and disadvantages?[10]

    Pipe and Filter Architecture

    Definition

    Pipe and Filter is a software architectural style in which a system is decomposed into a series of processing components (filters) connected by channels (pipes). Each filter reads data from its input, processes or transforms it, and writes the result to its output. The filters are independent of one another and communicate only through the pipes.

    Note: No specific curriculum notes were found for this topic. The answer below is based on standard, correct software engineering knowledge as taught in BSc CSIT.


    Key Components

    ComponentDescription
    FilterAn independent processing unit that transforms or computes on input data to produce output data
    PipeA connector (channel) that carries data from the output of one filter to the input of the next
    Data SourceThe origin of the input data stream (e.g., a file, keyboard, sensor)
    Data SinkThe final destination of the processed data (e.g., a file, display, database)

    How It Works

    [Data Source] --> |Pipe| --> [Filter 1] --> |Pipe| --> [Filter 2] --> |Pipe| --> [Data Sink]
    
    • Data flows unidirectionally through the pipeline.
    • Each filter is self-contained and knows nothing about the other filters.
    • Filters can run sequentially or even concurrently (in parallel pipelines).
    • The output of one filter is the input to the next.

    Example: Unix Command Pipeline

    A classic and well-known example is the Unix shell pipeline for text processing.

    Scenario

    Count the number of unique logged-in users whose names start with the letter "a".

    Command

    who | grep "^a" | sort | uniq | wc -l
    

    Pipeline Breakdown

    [who] --> |pipe| --> [grep "^a"] --> |pipe| --> [sort] --> |pipe| --> [uniq] --> |pipe| --> [wc -l]
    
    StepFilterRole
    1whoData source: lists all currently logged-in users
    2grep "^a"Filter: keeps only lines starting with "a"
    3sortFilter: sorts the lines alphabetically
    4uniqFilter: removes duplicate lines
    5wc -lData sink: counts and outputs the number of lines

    Each component does one specific job and passes its result to the next via a pipe.


    Another Example: Compiler Design

    A compiler is often structured as a pipe and filter system:

    [Source Code]
          |
          v
    [Lexical Analyzer]  --> tokens
          |
          v
    [Syntax Analyzer]   --> parse tree
          |
          v
    [Semantic Analyzer] --> annotated tree
          |
          v
    [Code Generator]    --> machine code
          |
          v
    [Output File]
    

    Each phase (filter) processes the output of the previous phase independently.


    Advantages of Pipe and Filter Architecture

    1. Simplicity and Clarity

      • The system is easy to understand because each filter has a single, well-defined responsibility.
    2. Reusability

      • Filters can be reused in different pipelines without modification (e.g., sort and grep in Unix are reused in many pipelines).
    3. Modifiability and Maintainability

      • Filters can be added, removed, or replaced without affecting other filters, as long as the data format is compatible.
    4. Concurrency

      • Multiple filters can execute in parallel (each on a different stage of the data), improving throughput.
    5. Ease of Testing

      • Each filter can be tested independently with known input and expected output.
    6. Flexibility

      • Different pipelines can be constructed by combining existing filters in new ways.
    7. Scalability

      • Individual filters can be scaled independently based on processing load.

    Disadvantages of Pipe and Filter Architecture

    1. Not Suitable for Interactive Systems

      • Because data flows in a fixed sequence, it is difficult to support interactive or event-driven applications (e.g., GUI applications).
    2. Data Transformation Overhead

      • If filters use different data formats, extra parsing and conversion between filters can reduce performance.
    3. Difficult Error Handling

      • Propagating and handling errors across multiple filters is complex; a failure in one filter can corrupt the entire pipeline.
    4. Latency

      • The entire pipeline must process data sequentially (unless parallelized), which can introduce latency for large datasets.
    5. Shared State is Difficult

      • Filters are stateless and independent, so sharing state or context across filters is not straightforward.
    6. Not Suitable for All Problems

      • Problems that require complex data sharing, backtracking, or non-linear data flow are difficult to model with this architecture.

    Summary Table

    AspectDetail
    StyleData-flow architectural style
    Main ComponentsFilters (processing) and Pipes (connectors)
    Data FlowUnidirectional, sequential
    Best Used ForCompilers, data processing, Unix tools, ETL systems
    Key BenefitModularity and reusability
    Key LimitationNot suitable for interactive or stateful systems

    Pipe and Filter is one of the most fundamental and widely used architectural patterns in software engineering, especially in data processing, compiler design, and operating system utilities.

  3. 310 marksIncremental development approachAnswer

    How can incremental development help in software production? Explain. What are its advantages and disadvantages?[10]

    Incremental development is a software development approach where the system is built and delivered in small, manageable portions called increments. Each increment adds new functionality to the previously delivered version, and the system...

  4. 45 marksDefinition and attributes of softwareAnswer

    Define software. What are the attributes of good software? [5]

    Software is a collection of computer programs, procedures, rules, and associated documentation and data that directs a computer to perform specific tasks. Unlike hardware, software is intangible and cannot be physically touched. It acts ...

  5. 55 marksTransaction processing systemsAnswer

    Explain transaction procession system and language processing system. [5]

    Note: The following answer is based on standard computer science / database and system software concepts, as no specific curriculum notes were available. --- A Transaction Processing System is a type of information system that collects, ...

  6. 65 marksStructural models and dynamic modelsAnswer

    Differentiate between structural model and dynamic model. Explain aggregation in UML. [5]

    Note: Reference notes were not available for this topic. The following answer is based on standard Software Engineering and UML concepts as taught in BSc CSIT curriculum. --- Aspect Structural Model Dynamic Model --------- Definition Rep...

  7. 75 marksRisk types and classificationAnswer

    List different types of risk. Explain the risk management process. [5]

    In software engineering, risks can be categorized as follows: Risks that affect the project schedule or resources. - Staff turnover, management changes - Hardware/software unavailability - Requirement changes Risks that affect the qualit...

  8. 85 marksClass diagramsAnswer

    Draw Class diagram for online voting system where user can vote the candidates. The system also generates the final result with respective vote counts as well. The user has to register and will be eligible only after proper validation. [5]

    Class Diagram for Online Voting System

    Description of Classes and Relationships

    The following class diagram represents an Online Voting System with registration, validation, voting, and result generation functionalities.


    Class Diagram (UML Notation)

    +------------------+          +----------------------+
    |      User        |          |    Registration      |
    +------------------+          +----------------------+
    | - userId: int    |1       1 | - regId: int         |
    | - name: String   |----------| - email: String      |
    | - email: String  |          | - password: String   |
    | - password: String|         | - status: String     |
    | - isEligible: bool|         +----------------------+
    +------------------+          | + register(): void   |
    | + login(): bool  |          | + validate(): bool   |
    | + logout(): void |          | + getStatus(): String|
    | + viewResult():void|        +----------------------+
    +------------------+
            |
            | 1
            |
            | (after validation)
            |
            | *
    +------------------+          +------------------+
    |      Vote        |          |    Candidate     |
    +------------------+          +------------------+
    | - voteId: int    |  *     1 | - candidateId:int|
    | - userId: int    |----------| - name: String   |
    | - candidateId:int|          | - party: String  |
    | - voteTime:DateTime         | - voteCount: int |
    +------------------+          +------------------+
    | + castVote():bool|          | + getVoteCount() |
    | + confirmVote()  |          |     : int        |
    +------------------+          | + updateCount()  |
            |                     |     : void       |
            |                     +------------------+
            |                            |
            |                            | 1
            |                            |
            | *                          | *
    +------------------+          +------------------+
    |   Validation     |          |     Result       |
    +------------------+          +------------------+
    | - validationId   |          | - resultId: int  |
    | - userId: int    |          | - candidateId:int|
    | - isVerified:bool|          | - totalVotes: int|
    +------------------+          | - rank: int      |
    | + checkEligibility|         +------------------+
    |     (): bool     |          | + generateResult()|
    | + verifyUser()   |          |     : void       |
    |     : bool       |          | + displayResult()|
    +------------------+          |     : void       |
                                  | + getWinner()    |
                                  |     : Candidate  |
                                  +------------------+
    

    Relationships Summary

    RelationshipTypeMultiplicityDescription
    User -- RegistrationAssociation1 to 1Each user must register once
    Registration -- ValidationDependency1 to 1Registration triggers validation
    User -- VoteAssociation1 to *A user can cast one or more votes (one per election)
    Vote -- CandidateAssociation* to 1Many votes belong to one candidate
    Candidate -- ResultAssociation1 to *Each candidate has result entries

    Key Design Points

    1. User registers through the Registration class and is validated before being marked eligible (isEligible = true).
    2. Validation class checks user credentials and eligibility before allowing voting.
    3. Vote class records each vote with timestamp, linking user and candidate.
    4. Candidate maintains a running voteCount updated on each vote.
    5. Result class aggregates all votes and generates the final result with rankings and total vote counts.
  9. 95 marksRequirements elicitation techniquesAnswer

    Explain different techniques that can be used for requirement elicitation. [5]

    Requirement elicitation is the process of gathering, discovering, and understanding the requirements of a system from stakeholders, users, and other sources. --- - One of the most widely used techniques. - The analyst directly interacts ...

  10. 105 marksWaterfall model and its applicationsAnswer

    Briefly explain waterfall model. When should we use water fall model? [5]

    The Waterfall Model is a linear and sequential software development model where each phase must be completed fully before the next phase begins. It is the oldest and most widely used classical model in software engineering. The flow of t...

  11. 115 marksTest-driven development approachAnswer

    Why test driven development approach is productive in software development? Explain. [5]

    Test Driven Development (TDD) is a software development approach in which tests are written before the actual code is written. The developer first writes a failing test case, then writes the minimum code to pass that test, and finally re...

  12. 125 marksSoftware quality assuranceAnswer

    Write short notes on: a. Software quality assurance b. Version management [5]

    Short Notes

    a. Software Quality Assurance (SQA)

    Software Quality Assurance is a set of activities designed to ensure that the software development process and the resulting software product meet defined quality standards and requirements.

    Key aspects of SQA:

    • Process-oriented: SQA focuses on monitoring and improving the software development process, not just the final product
    • Standards and procedures: It involves defining coding standards, review procedures, and testing guidelines that must be followed throughout development
    • Reviews and audits: SQA includes formal technical reviews, code inspections, and process audits to detect defects early
    • Testing oversight: It ensures that testing is planned, executed, and documented properly (unit testing, integration testing, system testing)
    • Defect tracking: Recording, analyzing, and resolving defects to prevent recurrence
    • Documentation: Ensuring all artifacts (requirements, design, code, test plans) are properly documented

    Goal: To provide confidence that the software will satisfy stated functional and non-functional requirements.


    b. Version Management

    Version Management (also called Version Control or Revision Control) is the process of tracking and controlling changes to software source code and related documents over time.

    Key aspects of Version Management:

    • Version tracking: Every change to a file is recorded with a unique version number, timestamp, and author information
    • Repository: A central storage location where all versions of files are maintained (e.g., Git repository)
    • Check-in / Check-out: Developers check out files to modify them and check them back in after changes
    • Branching and merging: Allows parallel development on different features or releases; branches can later be merged back into the main codebase
    • Rollback: Enables reverting to a previous stable version if a new change introduces errors
    • Collaboration support: Multiple developers can work on the same project without overwriting each other's work (conflict resolution)

    Popular tools: Git, SVN (Subversion), CVS, Mercurial

    Goal: To maintain a complete history of software changes, support team collaboration, and enable recovery from errors at any point in development.

  13. 135 marksVersion management and version controlAnswer

    What is version management? How is it carried Out? [5]

    Version Management

    Definition

    Version management (also called version control) is the process of keeping track of different versions of software components and the systems in which these components are used. It allows developers to manage changes to source code, documents, and other files over time, ensuring that previous versions can be retrieved and that multiple developers can work on the same project without conflict.


    How Version Management is Carried Out

    Version management is carried out through the following key activities and mechanisms:

    1. Version and Release Identification

    • Each version of a software component is assigned a unique identifier (e.g., v1.0, v1.1, v2.0).
    • Versions may be identified using:
      • Version numbers (sequential numbering)
      • Date/time stamps
      • Attribute-based identification (describing properties of the version)

    2. Storage Management

    • A version control system (VCS) stores all versions of components in a repository.
    • To save storage space, only the differences (deltas) between versions are stored rather than complete copies of each version.

    3. Change Logging

    • Every change made to a component is recorded with a description, who made the change, and when it was made.
    • This provides a complete audit trail of the evolution of the software.

    4. Independent Development (Branching and Merging)

    • Developers can create branches to work on new features or bug fixes independently without affecting the main codebase.
    • Once work is complete, branches are merged back into the main line.
    • This supports parallel development by multiple team members.

    5. Project Support

    • A VCS can manage multiple projects and track which versions of components belong to which project or release.
    • It supports configuration management by linking component versions to specific system builds.

    Common Version Control Systems

    TypeExamples
    Centralized VCSCVS, SVN (Subversion)
    Distributed VCSGit, Mercurial

    Summary

    Version management ensures that:

    • No work is lost due to accidental changes
    • Previous working versions can be restored
    • Multiple developers can collaborate without overwriting each other's work
    • The complete history of changes is maintained for accountability and debugging

    Note: The above answer is based on standard software engineering principles as no specific curriculum notes were available for this topic.