Bcs 51 June 22 Notes
Bcs 51 June 22 Notes
1.(b) What is function oriented design of software system ? Explain its advantages and
disadvantages.
Function-oriented design is a methodology in software engineering where the primary focus is
on the functions or operations that the software system needs to perform. In this design
paradigm, the system is divided into a set of functions or procedures, each of which performs a
specific task or set of tasks. The emphasis is on the processing of data through these functions,
rather than on the data itself. This approach is typically associated with procedural
programming languages such as C.
Key Aspects of Function-Oriented Design:
1. Function Decomposition: The system is decomposed into a hierarchy of functions or
procedures. Each function represents a specific operation or process that the system
needs to perform.
2. Process-Centric: The design revolves around the processing logic. The system is modeled
in terms of processes and operations.
3. Modularity: Functions are designed to be modular, meaning that each function is a self-
contained unit that performs a specific task.
4. Data Handling: Data is often treated as secondary to the functions that process it. While
data structures are used, the design focuses more on how functions manipulate data
rather than on the data structures themselves.
Advantages of Function-Oriented Design:
1. Simplicity: Function-oriented design is straightforward and easy to understand,
especially for simpler systems.
2. Ease of Implementation: Implementing function-oriented designs can be simpler
because the focus is on individual procedures or functions.
3. Clear Flow of Control: The flow of control through the system is clearly defined by the
sequence of function calls.
4. Modularity: Functions are designed to be modular, which means that changes or
updates to one function can be made with minimal impact on other parts of the system
Disadvantages of Function-Oriented Design:
1. Data Management Challenges: In function-oriented design, data is often treated as
secondary to functions. This can lead to challenges in managing and organizing data
effectively.
2. Lack of Flexibility: As the system grows, managing and understanding the interactions
between numerous functions can become complex.
3. Difficulty in Handling Complex Systems: For large and complex systems, function-
oriented design can become cumbersome.
4. Limited Reusability: Functions are often tightly coupled with specific tasks, which can
limit their reusability in different contexts.
5. Poor Support for Modern Practices: Function-oriented design may not align well with
modern software engineering practices that emphasize data abstraction and
encapsulation, such as object-oriented design.
Function-oriented design provides a clear, process-centric approach to software development
that can be advantageous for simpler systems and straightforward implementations .
(c) Which software development model is suitable for developing ‘Online Examination System’
? Justify your selection. Also explain the selected model.
When developing an Online Examination System, it’s essential to choose an appropriate
software development model. Let’s explore a suitable model and justify the selection:
1. Iterative Enhancement Model:
Justification:
• The Iterative Enhancement Model is well-suited for projects where requirements evolve
over time. In the case of an online examination system, requirements may change due to
user feedback, technological advancements, or educational policies.
• With this model, you can start with a basic version of the system and then iteratively
enhance it based on user needs and emerging requirements.
• It allows for incremental development, meaning you can add features, improve security,
and enhance usability step by step.
• Since online examination systems often require frequent updates (e.g., question banks,
security patches), an iterative approach ensures flexibility.
Explanation:
• In the Iterative Enhancement Model, you begin with a baseline version of the system.
• Each iteration involves:
Requirements analysis: Gather user needs, define features, and prioritize enhancements.
Design and development: Enhance existing features or add new ones.
Testing: Validate changes and ensure system stability.
Deployment: Release the updated version.
Benefits:
1. Adaptability: Respond to changing requirements promptly.
2. Risk reduction: Address issues early in the development process.
3. User involvement: Engage stakeholders throughout iterations.
4. Continuous improvement: Regular updates enhance functionality.
Challenges:
1. Coordination: Managing multiple iterations can be complex.
2. Documentation: Ensure proper documentation for each version.
3. Testing: Rigorous testing needed for each enhancement.
The Iterative Enhancement Model aligns well with the dynamic nature of online examination
systems and provides a structured approach for continuous improvement.
2.(b)What is software maintenance ? Explain any two types of software maintenance in detail.
Software maintenance refers to the process of modifying and updating software applications
after their initial release to correct defects, improve performance, enhance features, or adapt to
changing environments or requirements. Maintenance ensures that software remains
functional, reliable, and relevant over time.
Software maintenance typically encompasses activities such as bug fixing, performance tuning,
updates, and adapting the software to new operating environments or requirements. It is a
critical aspect of the software lifecycle and can involve various types of modifications.
Two Types of Software Maintenance:
1. Corrective Maintenance:
Definition: Corrective maintenance involves fixing defects or bugs that were discovered after
the software was deployed. This type of maintenance is reactive and is performed to address
issues that cause the software to behave incorrectly or fail to meet its intended requirements.
Key Aspects:
o Purpose: The main goal is to correct errors or malfunctions that are causing the
software to perform poorly or not function as intended.
o Activities: This includes debugging, troubleshooting, and applying patches or
fixes to resolve identified issues.
o Examples:
1. Fixing a bug that causes a system crash when a specific function is used.
2. Resolving a security vulnerability that exposes user data to unauthorized access.
3. Correcting errors in calculations or data processing that result in incorrect output.
Importance: Corrective maintenance is crucial for maintaining software reliability and user
satisfaction. It ensures that issues are addressed promptly to prevent disruption in the
software’s functionality and to maintain the trust of users.
Adaptive Maintenance:
Definition: Adaptive maintenance involves modifying the software to ensure its continued
operation in changing environments or to accommodate new requirements. This type of
maintenance is proactive and focuses on adapting the software to external changes, such as
new hardware, operating systems, or regulatory requirements.
Key Aspects:
• Purpose: The main goal is to ensure that the software remains compatible with changes
in the external environment and continues to meet evolving user needs or regulations.
• Activities: This includes updating the software to work with new hardware or operating
system versions, integrating with new technologies, and making adjustments to comply
with updated regulations or standards.
• Examples:
1. Updating a software application to be compatible with a new version of an operating
system.
2. Modifying the software to integrate with a new third-party service or API.
3. Adapting the software to meet new industry regulations or standards.
Importance: Adaptive maintenance is essential for keeping software relevant and functional as
technology and requirements evolve. It ensures that the software continues to deliver value and
remain operational in a changing technological landscape.
Q3 Blank
(b) Explain unit testing and module testing with the help of suitable example for each
Unit Testing: It is a software testing method where individual units or components of a software
application are tested in isolation from the rest of the system. A unit is the smallest testable part
of the software, such as a function or a method in a class. The purpose of unit testing is to verify
that each unit of code performs as expected and to catch defects early in the development
process.
Objective:
1. To ensure that each unit of code (e.g., a function or method) performs its intended task
correctly.
2. To identify and fix bugs at the earliest stage of development.
3. To provide a clear specification of how a unit should behave.
Example: Consider a simple function that calculates the square of a number:
1. Suppose we’re building a Java class that calculates the area of a rectangle. The class has
a method called calculateArea() that takes the length and width as input parameters and
returns the area.
2. A unit test for this method would:
3. Input: Provide specific length and width values (e.g., length = 5, width = 3).
4. Expected Output: Verify that the calculated area matches the expected result (e.g., area
= 15 square units).
5. If the test passes, the calculateArea() method is functioning correctly at the unit level.
Module Testing
Definition: Module testing, also known as integration testing at the module level, involves
testing a collection of related functions or classes (a module) to ensure that they work together
as expected. This type of testing focuses on the interactions between components within a
module and how well they integrate to perform a higher-level function.
Objective:
1. To verify that multiple components or classes within a module work together correctly.
2. To ensure that the integration of these components produces the correct output or
behavior.
3. To identify issues in the interaction between related parts of the module.
4. Example:
o Consider an authentication module in an online shopping system. This
module handles user login, registration, and password reset.
o A module test for the authentication module would:
1. Test Cases:
2. Input Scenarios:
3. Expected Outcomes:
o If all scenarios pass, the authentication module is working as intended.
(b) What is verification ? How is it different from validation ? Briefly explain any four principles
of software testing.
Verification: Verification is the process of evaluating a system or component to determine
whether it satisfies the specified requirements. It involves checking if the product is being built
correctly according to the design and specifications. Verification is a static process, meaning it
does not involve executing the software but rather reviews, inspections, and audits to ensure
that the software conforms to its specifications.
Validation: Validation, on the other hand, is the process of assessing whether the software
meets the needs and expectations of the end users. It involves dynamic testing of the software
to ensure it fulfills the intended use and provides the functionality that users require. Validation
typically involves executing the software with real-world scenarios and input data to ensure that
it behaves as expected.
Principles of Software Testing
1. Testing Shows Presence of Defects: Testing can demonstrate the presence of defects but
cannot prove the absence of defects. This principle emphasizes that no matter how
thorough the testing process, it is not possible to guarantee that the software is
completely free of defects. Instead, testing aims to identify and address as many issues
as possible.
2. Early Testing: Testing activities should start as early as possible in the software
development lifecycle. Early testing helps identify defects at an early stage, reducing the
cost and effort required to fix them later. This principle promotes the idea of integrating
testing activities into the development process from the beginning, rather than leaving it
to the end.
3. Exhaustive Testing is Impossible: It is not feasible to test all possible inputs and paths
within a software system due to the vast number of combinations and scenarios.
Therefore, testing should focus on a representative subset of test cases that provide
sufficient coverage to identify critical defects. This principle highlights the importance of
prioritizing and selecting test cases based on risk and impact.
4. Defect Clustering: Defects are often clustered in specific areas of the software rather
than being uniformly distributed. This principle means that a small number of modules
or components are likely to contain most of the defects. By identifying these high-risk
areas, testers can focus their efforts on the parts of the software where defects are most
likely to occur.