Understanding Software Engineering Essentials
Understanding Software Engineering Essentials
Answer:
Answer: From a software engineer's perspective, the work product is the set of programs, data
(content), and other related artifacts that constitute the software.
From the user's viewpoint, the work product is the resulting information that improves their world.
Answer: For example, operating systems (software) are products, but they also serve
as the delivery vehicle for other application software.
1
6. Describe the Bathtub Carve of software.
Answer:
The Bathtub Curve shows how software failure rates change over time. At first, failures are high
due to early bugs. Then, the software becomes stable with fewer issues. Later, as the software
ages or changes are made, failures increase again. Each update can cause new problems, so
the actual failure rate rises in spikes, unlike the smooth ideal curve.
The Bathtub Curve for hardware shows how often hardware fails over time. At the beginning,
many parts fail quickly because of early problems like factory defects—this is called infant
mortality. After that, the failure rate becomes low and stays steady during the useful life of
the hardware, when it works well. Later, as the hardware gets old, it starts failing more often
again—this is the wear-out stage. The curve looks like a bathtub because of this shape: high
at the start, low in the middle, and high at the end.
2
8. Difference between software and a hardware in terms of bathtub
Curve? Answer:
Hardware Software
Fails early due to factory defects (infant Fails early due to bugs in the code
mortality)
Works well for a long time (stable phase) Works well after bugs are fixed (stable
phase)
Fails later due to aging and wear-out Fails later when updates introduce new bugs
Failure caused by physical wear and tear Failure caused by code errors or changes
Gets old and breaks down over time Doesn’t age, but changes can make it
unstable
Bathtub curve is natural and predictable Bathtub curve depends on how often it’s
updated
3
12. Why is legacy Software still used?
4
13. What is Software Engineering according to Fritz Bauer?
Software engineering can be viewed as having a layered approach, with quality at its core. These layers
work together to build high-quality software:
A Quality Focus: This is the foundation, representing the organization's commitment to
delivering high-quality software.
Process: The framework that defines the "how" of software development, including activities,
tasks, and workflow.
Methods (Practice): Provide the technical "how-to's" for building software, encompassing tasks
like requirements analysis, design, code generation, and testing.
Tools: Automated or semi-automated support for the process and methods.
Example: For developing a new e-commerce platform:
o The team maintains a quality focus by adhering to coding standards and conducting
regular reviews.
o They follow an agile process with iterative development cycles.
5
o The methods involve using user stories for requirements, object-oriented design
principles, and unit testing.
o The tools include an Integrated Development Environment (IDE), a version control
system, and automated testing frameworks.
Answer:
The generic process framework for software engineering defines five fundamental "framework
activities" that apply to all software projects:
2. Planning: Establishes the software project plan, outlining tasks, potential risks, necessary
resources, desired work products, and the project schedule.
3. Modeling: Creates models for both requirements and design. This includes building analysis
models to understand functional and non-functional requirements and design models for
architectural and component details.
4. Construction: Combines code generation (either manual or automated) and various levels of
testing to ensure functionality.
6
18. Describe the essence of Software Engineering practice by George Polya?
1. Understand the problem: Deeply comprehending what needs to be solved, why it's important,
its context, and the desired outcome.
2. Plan a solution: Devising a plan to address the problem, considering different approaches and
alternatives.
4. Examine the result: Verifying if the implemented solution is correct, meets the requirements,
and truly solves the original problem.
19. When you are thinking of starting new software, how the business need is
expressed?
Answer: The business need usually begins as an informal conversation between managers
and stakeholders. It involves discussing the idea, market potential, technical feasibility, and
expected benefits of the software. This initial talk helps identify the problem or opportunity
the software will address and sets the direction for the [Link] example, a company may
discuss creating a new wireless device to control home appliances, exploring market demand,
costs, and revenue expectations before starting development.
7
Chapter 2: Process model
8
6. Describe Umbrella Activities of a software process?
Answer: Umbrella activities are tasks that support the main steps of the software process.
They happen throughout the entire project to help keep everything on track, improve quality,
and manage the work properly.
Project Management: Plans and controls the project to meet time, cost, and goals.
Quality Assurance (QA): Checks that the software is high-quality and meets
standards.
Risk Management: Finds and solves problems early to avoid project failure.
Configuration Management: Keeps track of all versions and changes in the project.
Communication: Makes sure all team members and clients stay informed.
Change Management: Handles changes in project scope or features smoothly.
Measurement and Metrics: Collects data to measure progress and improve
performance.
Advantages:
Disadvantages:
When to Use:
Answer:
A linear process flow follows a straightforward, step-by-step path where each step is
dependent on the previous one. The process moves in a clear, sequential order, from start to
finish.
9
Example: In a basic manufacturing process:
An iterative process flow involves repeating steps or cycles, where each cycle brings
improvements or refinements. The process goes back to previous steps to adjust or modify
the outcome based on feedback.
An evolutionary process flow builds the final product through progressive and adaptive
stages. Unlike iterative, this process continuously evolves, adapting to changing
requirements, feedback, or new information.
10
It evolves step-by-step, but can go back and forth as new features or improvements emerge.
In a parallel process flow, multiple activities or tasks occur at the same time. The steps are
divided into parallel paths that can be worked on simultaneously, improving efficiency and
reducing overall time.
This is used when tasks can be done independently without waiting for each other to finish.
Answer: Process assessment helps software companies understand their current process and
improve it to deliver better software on time, on budget, and of good quality.
I. SCAMPI
11
Based on the CMMI model.
III. SPICE
An international standard.
Helps in measuring the capability of a process.
Gives objective feedback for improvement.
10. Why the process model are called prescriptive process model?
Answer: Prescriptive process models are called "prescriptive" because they give clear steps to
follow when making software. They tell you what to do, when to do it, and how to do it.
These models help keep the work organized and under control. They are useful when the
project is clear from the start and needs a planned, step-by-step method.
11. For Waterfall model, describe the structure, advantage, disadvantage and when
to use it?
Answer: The Waterfall Model is a linear and sequential software development process
where each phase must be completed before moving to the next one. It follows a strict step-
by-step approach, meaning there is no going back to a previous phase once it is completed.
12
Structure: A linear sequential flow that progresses through distinct phases: communication
(requirements gathering), planning, modeling (analysis and design), construction (coding and testing),
and deployment (installation and support). Each phase must be completed before the next begins, with
little to no iteration back to previous phases.
12. For Incremental process, describe the structure, advantage, disadvantage and
when to use it?
Answer: The Incremental Process Model is a software development approach where the
system is built gradually in small parts (increments). Each increment adds new
functionalities, making the software usable step by step instead of delivering it all at once.
Y-Axis (Vertical): Represents Software Functionality and Features, meaning the software
improves with each increment.
X- Axis (Horizontal): Represents Project Calendar Time, meaning development happens in
stages over time.
Colour Blocks: Represent different phases of development in each increment.
13
Phases in Each Increment:
This process ensures that a basic version of the software is available early, with continuous
improvements over time.
Advantages
Disadvantages
Requires Careful Planning – Each increment must fit well with previous ones.
More Testing Effort – Every new increment needs to be tested individually and as a
whole.
Integration Issues – New increments must work smoothly with previous ones.
Not Suitable for Small Projects – It can be complex for small-scale software.
14
13. For Rapid Application Development (RAD) model, describe the structure,
advantage, disadvantage and when to use it?
Structure:
Advantages:
2-3 months' time period.
Use of AI for automated code generation.
Resources are available at all times.
Reduced development time.
Quick Initial Review
Customer Review
Disadvantages:
When to Use:
14. For Prototyping model, describe the structure, advantage, disadvantage and
when to use it?
Answer:
15
Definition:
Advantages:
Early and continuous customer involvement helps clarify requirements and reduce ambiguity.
Reduces the risk of building the wrong product.
Helps validate feasibility of design choices.
Provides a tangible representation for stakeholders to evaluate.
Disadvantages:
Customers might mistake the prototype for the final system, leading to unrealistic expectations.
Developers might "throw away" the prototype without proper planning or attempt to evolve a
“quick-and-dirty” prototype into a production system, leading to poor quality.
Can lead to an excessive number of iterations if not well-managed.
When to Use?
15. For Spiral model, describe the structure, advantage, disadvantage and when to
use it?
Answer:
16
Definition:
Disadvantages:
When to Use?
When the project has high risks (e.g., financial, security, or safety risks).
For large and complex projects (e.g., aircraft software, defense systems).
When continuous testing and feedback are required.
Users get confused: They may think the prototype is the final product.
Missing important parts: It focuses more on the look than on deep system needs.
Bad design: Quick work may lead to poor design and weak structure.
High cost: Making many prototypes can increase the total cost.
Not good for big systems: Prototypes may not work well when made larger.
Too many changes: If users keep asking for changes, final work may get delayed.
Difficult to plan – It's hard to plan the full system at the beginning.
Design issues – Frequent changes can make the design messy or inconsistent.
Version control problems – Managing many versions becomes complicated.
Customer confusion – Users may not know which version is the final product.
Extra documentation effort – Changes require regular updates to documents.
17
18. What is Unified Process (UP)?
Answer: The Unified Process (UP) is a framework for software development that
follows an iterative and incremental approach. It is architecture-centric and
focuses on risk reduction at every stage. It uses the concept of object-oriented
architecture.
Outcome/Work Product:
✔ Initial project scope, rough timeline, and feasibility report.
Outcome:
✔ A working prototype with core architecture.
Outcome:
✔ A working version of the software with most of the functionality.
18
Transition Phase (Deployment & User Training)
Outcome:
✔ Final software product ready for use.
Advantages:
Disadvantages:
19
Chapter 3: Agile Development
2. Why is it important?
Answer: The modern business environment that spawns computer-based systems and
software products is fast-paced and ever-changing. Agile software engineering
represents a reasonable alternative to conventional software engineering for certain
classes of software and certain types of software projects. It has been demonstrated to
deliver successful systems quickly.
4. What is Agility?
Answer: Agility means being quick and flexible in software work. It helps teams handle
changes, talk well, work together, and deliver software fast in small steps.
20
The cost of change in software development refers to how much effort, time, and money it
takes to make changes to the system as the project progresses.
The relationship between agility and cost of change is shown in the graph:
In traditional approaches like the waterfall model, the cost of change increases
rapidly as development progresses.
Changes made during later phases (e.g., after design or implementation) are
very expensive.
Agile Software Processes:
Agile methods aim to reduce the cost of change by using short iterations,
continuous testing, and regular customer feedback.
As a result, changes can be made even in later stages with relatively lower cost
compared to traditional methods.
Ideal Agile Cost (Dashed Line in the Graph):
The ideal goal of agile is to keep the cost of change nearly constant throughout
the project.
Though not always fully achievable, agile practices help move closer to this
ideal.
Answer: The Agile Alliance has defined 12 key principles that guide Agile development.
These principles help ensure flexibility, customer satisfaction, and high-quality software
delivery.
21
iv. Daily collaboration between business people and developers.
v. Build projects around motivated individuals and trust them.
vi. Use face-to-face communication for effectiveness.
vii. Working software is the main measure of progress.
viii. Promote sustainable development with a constant pace.
ix. Focus on technical excellence and good design.
x. Emphasize simplicity – do only what is necessary.
xi. Let self-organizing teams create the best designs and solutions.
xii. Teams should reflect and improve their processes regularly.
Answer: The following are popular Agile development methods used in the software
industry:
I. Planning:
In this phase, user stories are collected from the customer, prioritized, and estimated by
the development team. These guide the iteration and release plans.
User stories values acceptance test criteria iterative plan.
II. Design:
XP encourages simple and clear design. CRC cards are used to assign responsibilities.
Developers may build prototypes (spike solutions) and refactor code to improve
structure.
Simple and Clear Design
CRC cards
Spike Solutions Prototype
III. Coding:
Coding starts with writing unit tests. Pair programming and continuous integration are
used to maintain code quality and detect issues early.
Pair Programming
Continuous Integration
22
IV. Testing:
Automated tests check each feature. Regression and acceptance tests ensure new and
existing features work as expected and meet customer needs.
Unit Test
Acceptance Testing
14. Why do we need agile and when we have other software development method?
Answer: We need Agile because traditional methods like the Waterfall model are
rigid and less adaptive to changes. Agile offers flexibility, faster delivery, and better
customer involvement. It supports frequent feedback, continuous improvement,
and early detection of issues, which leads to higher-quality software that meets
users’ real needs.
23
Chapter 4: Basic Concept of Software Quality
1. What is software testing?
Answer: Software testing is the process of evaluating a software system to check whether it
meets the specified requirements and to identify any bugs or errors. It ensures the quality,
reliability, and performance of the software.
Developers (Programmers): They perform unit testing to check if their own code
works properly.
Testers (QA Engineers): They do system testing, integration testing, and
regression testing to ensure the whole software works correctly.
Users (Customer or End-user): Sometimes, real users do acceptance testing to
see if the software meets their needs.
3. Why is it important?
Answer: Software testing is important because it helps find bugs, ensures quality,
improves performance, and makes sure the software works as expected before
releasing it to users.
Answer: A work product is any document, code, report, or item created during the software
development or testing process. It shows the progress and results of the work done.
Examples: Test cases, Bug reports, Design documents, Source code
24
6. As a test member, how do you ensure that you’ve done it right?
Answer: To ensure good quality in a software product, an effective quality process should
focus on the following:
Example: A game feels fun and smooth, so you think it’s good quality.
ii. User View: How a user views the effectiveness and quality of the software.
Example: A simple text editor might be considered high quality by a user who only needs
basic typing and saving functionality, even if it lacks advanced features like spell-checking or
collaboration. However, a professional writer might deem it low quality due to these
omissions.
iii. Manufacturing View: High quality, if the software is built according to the
requirements and has few to no bugs at all.
Example: A piece of safety-critical software, like the control system for a nuclear reactor,
would be considered high quality from this perspective if it strictly adheres to its detailed
specifications and has undergone rigorous testing to eliminate potential failures or errors.
iv. Product View: Quality is seen as a set of inherent attributes that the software possesses. More
quality means more desirable attributes.
Example: A website that loads fast and is easy to use is good quality.
25
v. Value-Based View: Trade-off between quality and attributes and cost. How much am I
getting from the software for the cost.
Dynamic analysis: Dynamic analysis, on the other hand, requires running the
program with test inputs to observe its actual behavior. This helps identify issues such
as crashes, memory leaks, or incorrect outputs that occur during execution. For
example, running unit tests or functional tests on the software is a form of dynamic
analysis.
26
12. What is verification and validation?
Answer:
Validation: Checking if the final software product meets the user’s needs and expectations. It
focuses on ―Are we building the right product?‖
Verification Validation
Ensures the product is built according to Ensures the product fulfils its intended
specifications use
Performed during development phases (early) Performed after development (usually at
the end)
Involves reviews, inspections, and walkthroughs Involves actual testing with
users/customers
Checks the correctness of intermediate products Checks the final product’s functionality
(requirements, design, code) and performance
Static process (no execution of code needed) Dynamic process (involves execution
and testing)
Goal: Build the product right Goal: Build the right product
Example: Code review, design review Example: User acceptance testing
(UAT), system testing
Answer:
***ErrorFault/Bug/DefectFailure
27
15. Describe the four objective of testing?
Answer:
Preconditions:
Test Steps:
Test Data:
Username: user@[Link]
Password: ValidPassword123
Expected Result:
Status:
[Pass/Fail]
Answer:
Preconditions:
Test Steps:
1. Enter number 8
2. Press the + button
3. Enter number 5
4. Press the = button
Test Data:
Input 1: 8
Input 2: 5
Operation: +
Expected Result:
Actual Result:
Status:
[Pass/Fail]
29
19. Design a test case for a contract from submission.
Answer:
Preconditions:
User is on the Contact Us page
Internet connection is active
Test Steps:
Test Data:
Name: Shifa
Email: shifa@[Link]
Message: Need help with your services.
Expected Result:
Actual Result:
Status:
[Pass/Fail]
Answer: Expected Outcome means the correct or desired result that a software
program should produce when given a specific input during testing.
30
21. Describe the four test levels with example.
III. System Testing: Tests the complete and integrated software system.
Example: Test the full login process, dashboard load, and user access flow of
an application.
I. User Acceptance Testing (UAT): This testing is done by the end users or clients to
check if the software works according to their needs and expectations. For example, a
customer tests an online shopping site to see if adding items to the cart and t h e
checkout process is working properly.
II. Business Acceptance Testing (BAT): This testing is done by the business team or
stakeholders to ensure that the software meets the business goals and supports the
business processes. For example, the sales team testing a CRM system to confirm it
supports their sales activities.
III. Contract Acceptance Testing (CAT): Conducted based on the criteria and
specifications defined in a contract between the developer and the client.
IV. Regulation Acceptance Testing (RAT): Ensures that the software complies with
relevant regulations, legal requirements, or industry standards.
V. Alpha Testing: Conducted at the developer's site by a small group of end-users,
typically within the organization, before general release. It's an early form of
acceptance testing.
Developers perform tests in a controlled environment.
Test the application’s basic features.
Report any issues found and fix them before moving to beta testing.
VI. Beta Testing: Conducted at customer sites by a larger group of real users in a real-
world environment. It's a public release for feedback and bug identification before the
final product launch.
Develop a version of the software for a limited audience.
31
Gather feedback, bug reports, and improvement suggestions.
Analyze user experience, security, and performance issues.
Fix critical bugs before the final release.
Answer:
32
Chapter 5: Unit Testing
Answer:
Exit() is used for normal (graceful) termination of a program. It closes open files
and returns a status code to the operating system.
Walkthrough: It is a review where the author leads the team through a manual or
simulated execution of the product using predefined scenarios.
33
5. Describe the steps of code review process in static unit testing?
1. Readiness:
i) Completeness
ii) Minimal Functionality
iii) Readability
iv) Complexity
v) Requirements and Design Documens
vi) Moderator
vii) Author
viii) Presenter
ix) Recordkeeping
x) Reviewer
xi) Observers
2. Preparation:
i) List of questions
ii) Potential change requests(CRs)
iii) Suggested improvement opportunities
3. Examination: Choose the CRs
4. Rework: Author makes changes according to CRs
5. Validation: If it meets desired requirements.
6. Exit: After Completion, write a report.
34
6. What is code review metrics?
Answer: Code review metrics are the measurement of data collected during the code review
process to evaluate its effectiveness. These metrics help in improving the review strategy,
estimating resources for future projects, and ensuring early detection of defects to improve
software quality.
These metrics make the code review process measurable and valuable as a testing strategy.
8. Write a C program for finding the square root of any number and then design a
series of unit test cases to test if it gives the correct result for every possible
input.
Answer:
Source Code:
#include<bits/stdc++.h>
using namespace std;
int main(){
double n;
cin>>n;
if(n<0) cout<<"Square root of "<<n<<" not possible"<<endl;
else cout<<"Square root of: "<<n<<" is = "<<sqrt(n)<<endl;
return 0;
}
Test Case 1:
Sample Input: 0
Expected Output: 0
Received Output: 0
35
Status: Pass
Test Case 2:
Sample Input: 1
Expected Output: 1
Received Output: 1
Status: Pass
Test Case 3:
Sample Input: 4
Expected Output: 2
Received Output: 2
Status: Pass
Test Case 4:
Sample Input: 7
Expected Output: 2.6458
Received Output: 2.6458
Status: Pass
Test Case 5:
Sample Input: -5
Expected Output: Square root of -5 not possible
Received Output: Square root of -5 not possible
Status: Pass
9. Write a C program for Odd-Even numbers and then design a series of unit
test cases to test if the program gives the correct output for every possible input.
Answer:
Source Code:
#include<bits/stdc++.h>
using namespace std;
int main(){
long long n;
cin>>n;
if(n==0) cout<<"Zero"<<endl;
else if(n%2==0) cout<<n<<" is even number"<<endl;
else cout<<n<<" is odd number"<<endl;
return 0;
}
//logic janite chahiya lojja diben na
Test Case 1:
Sample Input: 0
Expected Output: Zero
Received Output: Zero
Status: Pass
Test Case 2:
Sample Input: 1
Expected Output: 1 is odd number
36
Received Output: 1 is odd number
Status: Pass
Test Case 3:
Sample Input: 4
Expected Output: 4 is even number
Received Output: 4 is even number
Status: Pass
Test Case 4:
Sample Input: 1000000001
Expected Output: 1000000001 is odd number
Received Output: 1000000001 is odd number
Status: Pass
Test Case 5:
Sample Input: 100000000006
Expected Output: 100000000006 is even number
Received Output: 100000000006 is even number
Status: Pass
Test Case 6:
Sample Input: -5
Expected Output: -5 is odd number
Received Output: -5 is odd number
Status: Pass
Test Case 7:
Sample Input: -6
Expected Output: -6 is even number
Received Output: -6 is even number
Status: Pass
Test Case 8:
Sample Input: -5000000001
Expected Output: -5000000001 is odd number
Received Output: -5000000001 is odd number
Status: Pass
Test Case 9:
Sample Input: -500000006
Expected Output: -500000006 is even number
Received Output: -500000006 is even number
Status: Pass
37
Sample Input: -9223372036854775808
Expected Output: -9223372036854775808 is even number
Received Output: -9223372036854775808 is even number
Status: Pass
10. Write a C program for converting into capital/small and then design a series of
unit test cases to test if it gives the correct output for every possible input.
Answer:
Source Code:
#include<bits/stdc++.h>
using namespace std;
int main(){
char n, m;
cin>>n;
if(n>='A' && n<='Z') m=n+32;
else if(n>='a' && n<='z') m=n-32;
else{
cout<<n<<" is not an alphabet"<<endl;
return 0;
}
cout<<m<<endl;
}
//logic janite chahiya lojja diben na
Test Case 1:
Sample Input: a
Expected Output: A
Received Output: A
Status: Pass
Test Case 2:
Sample Input: z
Expected Output: Z
Received Output: Z
Status: Pass
Test Case 3:
Sample Input: A
Expected Output: a
Received Output: a
Status: Pass
Test Case 4:
Sample Input: Z
Expected Output: z
Received Output: z
Status: Pass
Test Case 5:
38
Sample Input: 5
Expected Output: 5 is not an alphabet
Received Output: 5 is not an alphabet
Status: Pass
11. Write a C program for +, -, *, and / user-defined functions and then design a
series of unit test cases to test if it gives the correct output for every possible
input.
Answer:
Source Code:
#include<bits/stdc++.h>
using namespace std;
int main(){
double n, m;
cin>>n>>m;
char op;
cin>>op;
if(op=='+') cout<<n+m<<endl;
else if(op=='-') cout<<n-m<<endl;
else if(op=='*') cout<<n*m<<endl;
else if(op=='/') {
if(m==0) cout<<"Division by zero not possible"<<endl;
else cout<<n/m<<endl;
}
else if(op=='%') {
if(m==0) cout<<"Division by zero not possible"<<endl;
else cout<<(int)n%(int)m<<endl;
}
else cout<<"Invalid operator"<<endl;
}
//logic janite chahiya lojja diben na
Test Case 1:
Sample Input: 5 6 +
Expected Output: 11
Received Output: 11
Status: Pass
Test Case 2:
Sample Input: 5 6 -
Expected Output: -1
Received Output: -1
Status: Pass
Test Case 3:
Sample Input: 5 6 *
Expected Output: 30
Received Output: 30
Status: Pass
Test Case 4:
39
Sample Input: 5 6 /
Expected Output: 0.8333
Received Output: 0.8333
Status: Pass
Test Case 5:
Sample Input: 5 6 %
Expected Output: 5
Received Output: 5
Status: Pass
Test Case 6:
Sample Input: 4 0 /
Expected Output: Division by zero not possible
Received Output: Division by zero not possible
Status: Pass
Test Case 7:
Sample Input: 4 0 %
Expected Output: Division by zero not possible
Received Output: Division by zero not possible
Status: Pass
40
Chapter 6: System Testing
41
Robustness tests determine how well the system recovers from various
input errors and other failure situations.
42
[Link] time to Repair(MTTR)
[Link] time Between Failure (MTBF).
iv. System availability
v. How many failures would occurs on average if the system is expected to
run 300 hours?
5. During the system testing phase of a software product, developers recorded the
time
intervals between system failures and the repair times required to
restore the system after each failure. The recorded data is as follows:
Failure No. Time Between Failures (hours) Repair Time (hours)
1 5 1.0
2 6 1.5
3 7 2.0
4 4 1.2
Questions:
i. Calculate the Mean Time To Failure (MTTF).
ii. Calculate the Mean Time To Repair (MTTR).
iii. Calculate the Mean Time Between Failures (MTBF).
iv. Determine the system availability as a percentage. If the system is
expected to run for 300 hours continuously, estimate how many
failures would occur on average based on the MTBF.
Answers:
Given Data:
Failure No. Time Between Failures (t₁, t₂, ...) Repair Time (r₁, r₂, ...)
1 5 1.0
2 6 1.5
3 7 2.0
4 4 1.2
= (5 + 6 + 7 + 4) / 4 = 5.7 / 4
= 22 / 4 = 1.425 hours
= 5.5 hours
43
3. Calculate MTBF (Mean Time Between Failures):
= 5.5 + 1.425
= 6.925 hours
= 300 / MTBF
= 300 / 6.925
≈ 43.32
Failures = 43
= 5.5 / 6.925
≈ 0.7942
= 79.42
44
Chapter 7: Product Metrics
Size
Complexity
Design Features
Performance
Quality Level
Reusability
Functionality
These measurements help the developer understand how big, complex, and reliable
the software is, and how well it performs.
2. Why it is important?
II. Complexity Metrics: These measure how complex the code or logic is.
Example: The Complexity of a code is O(n^2).
→ Useful to evaluate code maintainability.
IV. Performance Metrics: These evaluate the run-time behavior of software under
various conditions.
Example: Server response time, number of concurrent users supported.
→ Help in assessing the system's efficiency, scalability, and responsiveness under
expected and extreme loads.
45
V. Quality Metrics: These evaluate the quality of the product.
Example: Defect Density, Mean Time Between Failures (MTBF).
→ Help track reliability and performance.
VI. Reusability Metrics: These measure the extent to which software components or
design elements can be repurposed/reused.
Example: Number of times a component is reused, percentage of system built from
existing components.
→ Help in promoting efficient development by identifying and leveraging components
that can be used across multiple projects, reducing development time and cost.
VII. Functionality Metrics: These quantify the capabilities and features provided by
the software to satisfy user needs.
Example: Function Points.
→ Help in measuring the scope of features delivered, assessing completeness of
requirements, and tracking progress.
Questions
Calculate the Halstead Volume using the formula: Volume = 𝑁 × log2(𝑛) where
i. Calculate the average LOC per function.
ii.
46
𝑁=Total operators + Total operands
• Memory usage ≤ 50 MB
Answer
Given Data:
• LOC = 420
• Number of functions = 12
• Unique operators = 15
• Unique operands = 25
• Defects = 6
• Memory usage = 45 MB
= 420/12
= 35
Volume = 𝑁 × log2(𝑛)
= 180 + 220
= 400
47
= 15 + 25
= 40
= 2128.7712
Given Targets:
• Memory Usage ≤ 50 MB
Measured:
• Memory Usage = 45 MB
48
Chapter 8: Project Scheduling
Answer: Project Scheduling is the process of planning and organizing software development
tasks in a sequence, assigning resources, and setting timelines to ensure the project is
completed on time.
Time-Line Charts (Gantt Charts): These charts are a common method for representing a
project schedule. They illustrate the duration of each task on a timeline, often showing start and
end dates, and can visually represent task dependencies. They are valuable for tracking progress
and assessing if the project is falling behind schedule.
50
5. What is Project table?
Answer: A Project Table is a simple chart that shows the list of all project tasks,
who will do them, how much time each task will take, and the deadline. It helps to
plan and track the progress of a project step by step.
6. Draw a project table for a demo
project? Answer:
Questions:
I. Create a project schedule showing the start and end day of each task
(assume no holidays or weekends).
II. Draw a Gantt chart or a task schedule table to represent the project
visually.
51
III. Identify the critical path of the project.
IV. Calculate the total time required to complete the
project. Answers:
Given,
52
III. Critical Path
A critical path is the longest sequence of dependent tasks that
determine the project duration.
Dependency Path 1:
T1 → T2 → T3 → T4 → T6 → T7 → T8
Durations: 4 + 3 + 4 + 6 + 3 + 4 + 2 = 26 days
Dependency Path 2:
T1 → T2 → T3 → T5 → T6 → T7 → T8
Durations: 4 + 3 + 4 + 5 + 3 + 4 + 2 = 25 days
Critical Path = Path 1 (26 days). Any delay in tasks on this path will
delay the entire project.
IV. Total Time to Complete Project
The total time required = 26 days, based on the critical path.
Final Answers:
Question Answer
Start/End of Each Task See task table above
Gantt Chart Visual or text version (shown above)
Critical Path T1 → T2 → T3 → T4 → T6 → T7 → T8
Total Time Required 26 days
53
Sample Questions from Cost-Benefit Analysis
Scenario 1
Assume a discount rate of 10% for the purpose of calculating Present Value Analysis (PVA).
Question 1
Based on the information provided, perform a Cost Benefit Analysis for both Project A and
Project B.
Scenario 2
A university is considering automating its course registration system. Two options are being
evaluated:
54
Initial Cost: $60,000
Annual Licensing & Maintenance: $25,000
Expected Savings/Benefits: $40,000 annually
Lifespan: 4
8%.
Question 2
Scenario 3
A logistics company wants to invest in a new routing optimization software to reduce fuel
costs and delivery times. They have two choices:
Question 3
1. Perform a Cost Benefit Analysis to determine the PVA of both Project Alpha
and Project Beta.
2. Which project offers a better return on investment?
3. Aside from the PVA, what other criteria should management consider before
selecting a project?
Scenario 4
55
Suppose a company is planning to undertake one project this year. There are a total two
projects to choose from. The decision is very crucial as it is directly associated with
company’s reputation with customers as well as finance. The following table represents year
wise benefits and costs.
1st 40 45 22 25
2nd 45 50 30 40
4th 40 55 25 44
Question 4
1. Examine which project the company should choose by applying cost benefit
analysis techniques?
Question 1
A food delivery application allows users to create an account, place orders, track deliveries, and make
payments. The system notifies delivery drivers of new orders and allows them to update delivery
status. Admins manage user accounts and view reports.
Question 2
A school management system has classes for Student, Course, and Instructor. A student can
enroll in multiple courses, and each course can have one instructor.
Question 3
A university wants to develop a Student Enrollment System. Students submit applications, which
are processed by the admissions office. Once accepted, students pay fees and receive enrollment
confirmation. The system interacts with the finance department for payment verification.
56
a. Identify the external entities, processes, data flows, and data stores.
b. Draw a level one DFD for the system.
57