Tanisha Se
Tanisha Se
SOFTWARE ENGINEERING
(PC-IT- 306LA)
Submitted by Submitted to
Tanisha Garg Ms. Neha Bhatia
2822648 Assistant Professor
Once it is decided that the software project is in line with business and stakeholder
goals, feasible to create, and addresses user needs, then you can move on to the next
phase.
2. Define Requirements
This phase is critical for converting the information gathered during the planning and
analysis phase into clear requirements for the development team. This process guides
the development of several important documents: a software requirement specification
(SRS) or product specification, a Use Case document, and a Requirement Traceability
Matrix document.
3. Design
The design phase is where you put pen to paper—so to speak. The original plan and
vision are elaborated into a software design document (SDD) that includes the system
design, programming language, templates, platform to use, and application security
measures. This is also where you can flowchart how the software responds to user
actions.
In most cases, the design phase will include the development of a prototype model.
Creating a preproduction version of the product can give the team the opportunity to
visualize what the product will look like and make changes without having to go
through the hassle of rewriting code.
4. Development
The actual development phase is where the development team members divide the
project into software modules and turn the software requirement into code that makes
the product. This SDLC phase can take quite a lot of time and specialized
development tools. It’s important to have a set timeline and milestones so the software
developers understand the expectations and you can keep track of the progress in this
stage.
In some cases, the development stage can also merge with the testing stage where certain
tests are run to ensure there are no critical bugs.
Keep in mind, different types of product development software will have different specialties
so you’ll want to pick the one that suits you best.
5. Testing
Before getting the software product out the door to the production environment, it’s
important to have your quality assurance team perform validation testing to make sure
it is functioning properly and does what it’s meant to do. The testing process can also
help hash out any major user experience issues and security issues.
In some cases, software testing can be done in a simulated environment. Other simpler tests
c`an also be automated.
6. Deployment
During the deployment phase, your final product is delivered to your intended user.
You can automate this process and schedule your deployment depending on the type.
For example, if you are only deploying a feature update, you can do so with a small
number
of users (canary release). If you are creating brand-new software, you can learn more
about the different stages of the software release life cycle (SRLC).
7. Maintenance
The maintenance phase is the final stage of the SDLC if you’re following the waterfall
structure of the software development process. However, the industry is moving
towards a more agile software development approach where maintenance is only a
stage for further improvement. In the maintenance stage, users may find bugs and
errors that were missed in the earlier testing phase. These bugs need to be fixed for
better user experience and retention. In some cases, these can lead to going back to the
first step of the software development life cycle.
The SDLC phases can also restart for any new features you may want to add in your next
release/update.
Disadvantages:
• There is no backtracking.
• It assumes that only correct things happen at every phase of the model, which isn’t
practically possible.
2) Prototype Model:
The Prototype Model is a software development approach where a working prototype (a rough
version of the final product) is built early to gather user feedback before full-scale development.
This model is iterative and helps refine requirements based on real user interactions.
3) Evolutionary Model:
The Evolutionary Model is an iterative software development approach where the system is
developed in stages, gradually improving through multiple versions. Each version incorporates user
feedback and refinements, making it ideal for projects with evolving requirements.
Comparison Table:
Best for & Fixed, clear Unclear requirements; Frequent Large, complex projects
Feedback requirements; Frequent feedback updates, with risk
Little feedback changes; management;
until testing Regular Frequent feedback
feedback
Cost & Time High cost of Prototype may incur Cost High initial cost for
changes; high costs due decreases planning and risk
Fixed timeline to iterations with each analysis
iteration
Risk Management No risk Limited risk managementRisks identified Explicit focus on risk
management; through prototyping and mitigated analysis and
Difficult to handle in iterations mitigation in each
changes cycle
Program – 3
Aim: Study various types of feasibility study and steps in doing feasibility study
A feasibility study is a structured analysis conducted to determine the viability of a proposed project
or business idea before committing significant resources. It helps decision-makers understand the
potential strengths and weaknesses of the project, the risks involved, and whether the initiative is
worth pursuing.
Software requirement analysis simply means complete study, analyzing, describing software
requirements so that requirements that are genuine and needed can be fulfilled to solve problem.
There are several steps involved in analyzing Software requirements. Steps involved in Requirement
Analysis:
1. Identify Stakeholders:
• Objective: Determine who will be affected by or have influence over the project.
• Actions:
o List internal (team members, management) and external (customers,
suppliers) stakeholders.
o Conduct interviews or meetings to understand their expectations.
2. Gather Requirements:
• Objective: Collect detailed and clear inputs regarding what the project
should achieve.
• Techniques:
o Interviews & Workshops: Direct discussions to capture individual needs.
o Surveys & Questionnaires: Gather data from a larger audience.
o Observation: Study current workflows to identify gaps.
o Document Analysis: Review existing documents to extract historical and
contextual requirements.
Fig 4.1: Requirement Analysis
3. Categorize Requirements:
• Objective: Organize the gathered information to manage and prioritize effectively.
• Categories:
o Functional Requirements: Specific features, operations, or behaviors.
o Non-Functional Requirements: Performance, usability, security, and
reliability criteria.
o Business Requirements: High-level objectives that justify the project.
o Technical Requirements: System constraints and technology standards.
The COCOMO Model is a procedural cost estimate model for software projects and is often used as
a process of reliably predicting the various parameters associated with making a project such as
size, effort, cost, time, and quality. It was proposed by Barry Boehm in 1981. The key parameters
that define the quality of any software product, which are also an outcome of COCOMO, are
primarily effort and schedule:
• Effort: Amount of labor that will be required to complete a task. It is measured in person-
months units.
• Development Time: This simply means the amount of time required for the completion of
the job, which is, of course, proportional to the effort put in. It is measured in the units of
time such as weeks, and months.
Types of Projects in the COCOMO Model
In the COCOMO model, software projects are categorized into three types based on their
complexity, size, and the development environment. These types are:
• Organic: A software project is said to be an organic type if the team size required is
adequately small, the problem is well understood and has been solved in the past and also the
team members have a nominal experience regarding the problem.
• Semi-detached: A software project is said to be a Semi-detached type if the vital
characteristics such as team size, experience, and knowledge of the various programming
environments lie in between organic and embedded. The projects classified as Semi-
Detached are comparatively less familiar and difficult to develop compared to the organic
ones and require more experience better guidance and creativity. For example: Compilers or
different Embedded Systems can be considered Semi-Detached types.
• Embedded: A software project requiring the highest level of complexity, creativity, and
experience requirement falls under this category. Such software requires a larger team size
than the other two models and also the developers need to be sufficiently experienced and
creative to develop such complex models.
COCOMO Algorithm:
1. Start
2. Input the estimated size of software project in KLOC (Kilo Lines of Code).
3. Choose the project type:
• Organic
• Semi – Detached
• Embedded
4. Determine the effort equation parameters based on the project type:
• Organic: a = 2.4, b = 1.05
• Semi – Detached: a = 3.0, b = 1.12
• Embedded: a = 3.6, b = 1.2
5. Determine the development time equation parameters based on the project type:
• Organic: A = 2.5, b = 0.38
• Semi – Detached: A = 2.5, b = 0.35
• Embedded: A = 2.5, b = 0.32
6. Compute Efforts and Development time:
• Effort = a * (KLOC)^b
• Development Time (Tdev) = A*(Effort)^B
7. End
COCOMO Flowchart:
1- level DFD
In 1-level DFD, a context diagram is decomposed into multiple bubbles/processes. In
this level, we highlight the main objectives of the system and breakdown the high-
level process of 0-level DFD into subprocesses.
Let’s understand how to draw a Use Case diagram with the help of an Cop Disease
Prediction System:
To create a Use Case Diagram for the Crop Disease Prediction Model, we need to define the
actors, use cases, and relationships between them. Here's how it looks based on the diagram:
1. Actors:
• Farmer: The end-user who captures and uploads crop images, predicts diseases, and
receives treatment suggestions.
• Agri Expert: An agricultural expert who can view prediction history and help improve the
model.
• System Admin: Manages the system, updates the database, and handles user and model
management.
2. Use Cases:
• Capture Image: Farmer captures an image of the affected crop.
• Upload Image: Farmer uploads the captured crop image into the system.
• Predict Disease: The system processes the image to predict crop disease.
• View Result: Farmer views the disease prediction output.
• Suggest Treatment: System suggests treatments or solutions for the predicted disease.
• View History: Agri Expert accesses historical disease prediction records.
• Train Model: Agri Expert or Admin retrains the model using updated datasets.
• Update Database: Admin updates the dataset used for training and predictions.
• Manage Users: Admin manages user access and roles within the system.
3. Relations:
• Farmer:
o Capture Image
o Upload Image
o Predict Disease
o View Result
o Suggest Treatment
• Agri Expert:
o View History
o Train Model
• System Admin:
o Train Model
o Update Database
o Manage Users
Below is the use case diagram of an Diverse Medicinal Plants Interactive Platform:
Object-Oriented Design (OOD) is a software design approach where a system is organized around
real-world entities called objects. These objects are instances of classes, which define both data
(attributes) and behaviors (methods). OOD focuses on modeling software using the same principles
that describe physical objects, making systems more natural to design and understand.
OOD is based on the key principles of Object-Oriented Programming (OOP) and is widely used in
modern development for building reliable and scalable applications.
Benefits of Object-Oriented Design
• Reusability:
o Classes can be reused in multiple parts of the system or in different
projects. Inheritance also allows sharing of common code.
• Modularity:
o Since the code is divided into separate classes, it's easier to develop, test, and
maintain each part independently.
• Encapsulation:
o By keeping internal object details hidden, encapsulation enhances data security and
integrity. Changes to one part of the code do not affect others unexpectedly. •
Scalability:
o The system can be easily extended by adding new classes or modifying existing ones
without disrupting the whole application.
• Maintainability:
o The clear structure and separation of concerns make it easier to identify and fix bugs,
update features, and optimize performance.
• Flexibility:
o Through polymorphism and dynamic binding, the system can adapt to new
requirements and behaviors with minimal changes.
Code:
class Person {
protected String
name; protected int
age; protected String
gender;
public Person(String name, int age, String
gender) { this.name = name;
this.age = age;
}
public void displayInfo() {
System.out.println("Name: " + name + ", Age: " + age + ", Gender: " + gender);
}
}
class Student extends Person
{ private String
studentID; private String
course; private int year;
public Student(String name, int age, String gender, String studentID, String
course, int year) {
super(name, age, gender);
this.studentID = studentID;
this.course = course;
this.year = year;
}
@Override
public void displayInfo()
{ super.displayInfo();
System.out.println("Student ID: " + studentID + ", Course: " + course + ",
Year: "
+ year);
}
}
class Employee extends Person
{ private String
employeeID; private String
department; private double
salary;
public Employee(String name, int age, String gender, String employeeID,
String department, double salary) {
super(name, age, gender);
this.employeeID =
employeeID; this.department
= department; this.salary =
salary;
}
@Override
public void displayInfo() { super.displayInfo();
System.out.println("Employee ID: " + employeeID + ", Department: " +
department +
",
Salary: " + salary);
}
}
public class Main {
public static void main(String[] args) {
Student s = new Student("Alice", 20, "Female", "S123", "Computer
Science", 2); Employee e = new Employee("Bob", 35, "Male", "E456",
"IT", 50000); s.displayInfo();
System.out.println(
); e.displayInfo();
}
}
Output:
Class Diagram:
• A class diagram is a visual representation of the structure of a system in object-oriented design. It
shows the classes, their attributes (fields), methods (functions), and the relationships between
those classes.
• A class diagram consists of several key components that help define the structure of a system. The
class itself is represented by a rectangle divided into three sections: the top section displays the
class name, the middle section lists the attributes (properties or fields) of the class, and the bottom
section contains the methods (functions or operations) associated with the class.
• Attributes are the variables or properties of the class, usually shown in the middle part of the
rectangle, and their visibility is indicated with symbols such as + for public, - for private, and # for
protected. Methods are the functions that belong to the class, listed in the bottom section, and like
attributes, their visibility can be marked using the same symbols.
• Relationships between classes are essential in class diagrams, showing how classes interact. These
include associations (depicted as solid lines), arrows to show directionality (e.g., inheritance or
dependencies), and inheritance (represented by a solid line with a triangle arrowhead pointing to the
parent class). Aggregation or composition shows a "whole-part" relationship, indicated by a
diamond shape at the "whole" class.
• The visibility of attributes and methods in a class diagram determines their accessibility— public (+),
private (), or protected (#). Finally, multiplicity defines how many instances of a class are involved in
a relationship, such as one-to-many or many-to-many. These components together create a visual map
of how classes and objects interact within a system.
Key Concepts:
• Actors
o External entities (e.g., users, systems) that interact with the system.
• Objects / Components
o System parts that send or receive messages (e.g., modules, classes).
• Lifelines
o Vertical dashed lines showing an object’s presence over time.
• Messages
o Horizontal arrows representing calls, signals, or responses between lifelines.
• Activation Bars
o Rectangles on lifelines indicating when an object is actively performing an operation.
• Loops / Conditions
• Used to represent repeated or conditional interactions (e.g., retry loops, if/else).
Uses:
• Visualizing use case flows (e.g., login, checkout, book issue).
• Designing and debugging system interactions.
• Documenting business logic or service workflows.
• Supporting test case design and validation.
Benefits:
• Clarifies system behavior over time.
• Helps spot design flaws early.
• Bridges the gap between requirements and implementation.
Fig 10.1 Library Management System
Program – 11
Aim: Develop a complete test strategy for the program to find greatest among 3
numbers. Test Strategy:
This test strategy outlines how we will verify the functionality of the program find_greatest(a, b, c)
that identifies the greatest number among three given inputs. The strategy covers Black Box Testing
(functional testing based on input-output) and White Box Testing (structural testing based on
internal code paths).
Test Objectives:
• Correctness: Ensure the program correctly identifies the largest number from three input
numbers.
• Robustness: Ensure the program handles various edge cases, including negative numbers,
zeros, and equal values.
• Performance: Ensure that the program executes correctly and efficiently for a wide range
of inputs.
• Boundary Conditions: Validate the program's handling of edge cases such as equal
numbers, negative numbers, or zero.
Test Types:
1. Black Box Testing:
• This testing method focuses on the program's output based on various input
combinations, without considering the internal logic or structure.
• The test cases will primarily focus on the functional correctness of the program,
verifying that it produces the correct greatest number.
2. White Box Testing:
• This testing method checks the internal logic and code coverage.
• It ensures that all decision paths and branches in the program are tested to verify that
all conditions (e.g., a >= b and a >= c, b >= a and b >= c, and c >= a and c >= b) are
adequately tested.
Test Plan:
1. Black Box Testing:
The goal is to validate the functionality based on various combinations of inputs without considering
the code structure.
Test Scenarios and Cases:
• Scenario 1: Testing with positive numbers.
o Test Case 1: find_greatest(3, 5, 2) ▪ Expected Output: 5
Rationale: Regular case with positive numbers to test standard functionality.
• Scenario 2: Testing with negative numbers.
o Test Case 2: find_greatest(-3, -5, -2)
Expected Output: -2
Rationale: Ensures that the function correctly identifies the greatest
among negative numbers.
• Scenario 3: Testing with all equal numbers.
o Test Case 3: find_greatest(4, 4, 4)
Expected Output: 4
Rationale: Tests how the function handles equality, ensuring it can return
one of the values when all are equal.
• Scenario 4: Testing with zero and mixed values.
o Test Case 4: find_greatest(0, -2, 5) ▪ Expected Output: 5
Rationale: Verifies that zero and positive numbers are handled correctly.
Test Execution Criteria:
• Pass Criteria: The program must return the expected value for each test case.
• Fail Criteria: If the program returns an incorrect value for any test case, it will be
considered a failure.
2. White Box Testing:
This type of testing focuses on testing the internal logic of the program by ensuring that all code paths
and conditions are covered.
Test Scenarios and Cases:
• Scenario 1: Path where a >= b and a >= c.
o Test Case 1 (Path 1): find_greatest(5, 3, 2)
Expected Output: 5
Rationale: This tests the case where a is the greatest and the program
follows the path a >= b and a >= c.
• Scenario 2: Path where b >= a and b >= c.
o Test Case 2 (Path 2): find_greatest(2, 6, 4)
Expected Output: 6
Rationale: This tests the case where b is the greatest and the program
follows the path b >= a and b >= c.
• Scenario 3: Path where c >= a and c >= b.
o Test Case 3 (Path 3): find_greatest(2, 3, 5)
Expected Output: 5
Rationale: This tests the case where c is the greatest and the program
follows the path c >= a and c >= b.
• Scenario 4: Equality condition (a == b == c).
o Test Case 4 (Equality Condition): find_greatest(4, 4, 4)
Expected Output: 4
Rationale: This tests the case where all input values are equal, and the
program should handle this correctly.
Test Execution Criteria:
• Pass Criteria: The program must follow the correct decision path and return the
expected result for each test case.
• Fail Criteria: If any of the paths are not followed correctly or if the function returns an
incorrect result, it will be considered a failure.
Code:
public class GreatestFinder {
public static int findGreatest(int a, int b, int
c) { if (a >= b && a >= c) {
return a;
} else if (b >= a && b >= c) {
return b;
} else {
return c;
}
}
public static void blackBoxTests()
{ int result = findGreatest(3,
5, 2);
System.out.println("Black Box Test Case 1: " + (result == 5 ? "Passed"
: "Failed"));
result = findGreatest(-3, -5, -2);
System.out.println("Black Box Test Case 2: " + (result == -2 ? "Passed"
: "Failed"));
result = findGreatest(4, 4, 4);
System.out.println("Black Box Test Case 3: " + (result == 4 ? "Passed"
: "Failed"));
result = findGreatest(0, -2, 5);
System.out.println("Black Box Test Case 4: " + (result == 5 ? "Passed"
: "Failed"));
}
public static void whiteBoxTests()
{ int result = findGreatest(5,
3, 2);
System.out.println("White Box Test Case 1 (Path 1): " + (result == 5 ?
"Passed" : "Failed"));
result = findGreatest(2, 6, 4);
System.out.println("White Box Test Case 2 (Path 2): " + (result == 6 ?
"Passed" : "Failed"));
result = findGreatest(2, 3, 5);
System.out.println("White Box Test Case 3 (Path 3): " + (result == 5 ?
result = findGreatest(4, 4, 4);
System.out.println("White Box Test Case 4 (Equality Condition): " +
(result
== 4 ? "Passed" : "Failed"));
}
public static void main(String[] args)
{ System.out.println("Running Black Box Tests...");
blackBoxTests();
System.out.println("\nRunning White Box Tests...");
whiteBoxTests();
}
}
Output: