Ecse Unit II
Ecse Unit II
Software development
Software Development Life Cycle (SDLC) is a process used by the software industry to
design, develop and test high quality softwares.
SDLC Models
Software Development life cycle (SDLC) is a spiritual model used in project management that
defines the stages include in an information system development project, from an initial
feasibility study to the maintenance of the completed application.
There are different software development life cycle models specify and design, which are
followed during the software development phase. These models are also called "Software
Development Process Models." Each process model follows a series of phase unique to its
type to ensure success in the step of software development.
Waterfall model
Water fall model is also called as Linear Sequential Model, as the phases are arranged in
sequential model. Winston Royce introduced the Waterfall Model in 1970.This model has six
phases:
1. Requirements: The first phase involves gathering requirements from stakeholders and
analyzing them to understand the scope and objectives of the project. It describes the "what"
of the system to be produced and not "how."In this phase, a large document called
Software Requirement Specification (SRS) document is created which contained a
detailed description of what the system will do in the common language.
2. Design: Once the requirements are understood, the design phase begins. This involves
creating a detailed design document that outlines the software architecture, user interface, and
system components. It defines the overall software architecture together with high level and
detailed design. All this work is documented as a Software Design Document (SDD).
4. Testing: In the testing phase, the software is tested as a whole to ensure that it meets
the requirements and is free from defects. Finally, after all the modules have been successfully
tested, the full working system is obtained and system testing is carried out on this. System
testing consists of three different kinds of testing activities as described below.
● Alpha testing: Alpha testing is the system testing performed by the development team.
● Beta testing: Beta testing is the system testing performed by a friendly set of
customers.
● Acceptance testing: After the software has been delivered, the customer performs
acceptance testing to determine whether to accept the delivered software or reject it.
5. Deployment: Once the software has been tested and approved, it is deployed to the
production environment. Deployment makes the software available to the public where users
can use the application or software.
6. Maintenance: The final phase of the Waterfall Model is maintenance, which involves fixing
any issues that arise after the software has been deployed and ensuring that it continues to
meet the requirements over time. There are three types of maintenance.
● Corrective Maintenance: This type of maintenance is carried out to correct errors that
were not discovered during the product development phase.
● Perfective Maintenance: This type of maintenance is carried out to enhance the
functionalities of the system based on the customer’s request.
● Adaptive Maintenance: Adaptive maintenance is usually required for porting the
software to work in a new environment such as working on a new computer platform or
with a new operating system.
Some Circumstances where the use of the Waterfall model is most suited are:
∙ A project is short
∙ Where the tools and technology used is consistent and is not changing ∙ When
resources are well prepared and are available to use.
● This model is simple to implement also the number of resources that are required for it
is minimal.
● The requirements are simple and explicitly declared; they remain unchanged during the
entire project development.
● The start and end points for each phase is fixed, which makes it easy to cover progress.
● The release date for the complete product, as well as its final cost, can be determined
before development.
● It gives easy to control and clarity for the customer due to a strict reporting system.
● In this model, the risk factor is higher, so this model is not suitable for more significant
and complex projects.
The Agile software development life cycle is the structured series of stages that a product
goes through as it moves from beginning to end. It contains six phases: concept, inception,
iteration, release, maintenance, and retirement.
As mentioned, the Agile software development life cycle consists of six phases. Let’s examine
each of these Agile phases in more detail.
1. Requirement Analysis:- In this step, the development team must gather the
requirements, by interaction with the customer. Development team should plan the time
and effort needed to build the project. Based on this information you can evaluate
technical and economical feasibility.
2. Design the Requirements:- In this step, the development team will use user-flow-
diagram or high-level UML diagrams to show the working of the new features and show
how they will apply to the existing software. Wireframing and designing user interfaces
are done in this phase.
3. Construction / Iteration:- In this step, development team members start working on their
project, which aims to deploy a working product.When the team defines the requirements,
the work begins. Designers and developers start working on their project, which aims to
deploy a working product. The product will undergo various stages of improvement, so it
includes simple, minimal functionality.
4. Testing / Quality Assurance:- In this phase,these Agile team members will test the
system to ensure the code is clean — if potential bugs or defects are detected, the
developers will address them swiftly. User training will also take place during this phase,
which will require more documentation. When all of this is complete, the product’s final
iteration can then be released into production. There are three roles in it, and their
responsibilities are:
○ Scrum Master: The scrum can set up the master team, arrange the meeting and remove
obstacles for the process
○ Product owner: The product owner makes the product backlog, prioritizes the delay and is
responsible for the distribution of functionality on each repetition.
○ Scrum Team: The team manages its work and organizes the work to complete the cycle.
○ Other testing methods are Crystal, Dynamic Software Development Method(DSDM) And
Feature Driven Development(FDD).
5. Deployment: In this phase, the team issues a product for the user's work environment.
6. Feedback: The last step is feedback after releasing the product. In this, the team
receives feedback about the product and works through the feedback.
● Working through Pair programming produces well-written compact programs which have
fewer errors as compared to programmers working alone.
● It reduces the total development time of the whole project.
● Agile development emphasizes face-to-face communication among team members, leading
to better collaboration and understanding of project goals.
● Customer representatives get the idea of updated software products after each iteration. So,
it is easy for him to change any requirement if needed.
● Agile development puts the customer at the center of the development process, ensuring that
the end product meets their needs.
● The lack of formal documents creates confusion and important decisions taken during
different phases can be misinterpreted at any time by different team members.
● It is not suitable for handling complex dependencies.
● The agile model depends highly on customer interactions so if the customer is not clear, then
the development team can be driven in the wrong direction.
● Agile development models often involve working in short sprints, which can make it difficult
to plan and forecast project timelines. This can lead to delays in the project and can make it
difficult to accurately estimate the costs and resources needed for the project.
● Agile development models require a high degree of expertise from team members, as they
need to be able to adapt to changing requirements and work in an iterative environment.
● Due to the absence of proper documentation, when the project completes and the developers
are assigned to another project, maintenance of the developed project can become a
problem.
1. Programming Languages:
Programming Paradigms
A programming paradigm is a style or method of writing and organizing code. The diagram
breaks this into two major categories: Imperative Paradigm and Declarative Paradigm.
1. Imperative Paradigm
The imperative paradigm focuses on describing how a program operates by providing explicit
step-by-step instructions. Programs control the flow of execution and state changes.
a) Procedural Programming
Definition: Programs are organized into procedures or routines (also called functions or
subroutines).
Example in C:
#include <stdio.h>
int main()
{
printf("Hello World");
}
b) Structured Programming
Definition: Structured programming improves the clarity of programs by using control structures
like loops and conditionals.
Example in Python:
def factorial(n):
if n == 0:
return 1
else:
return n * factorial(n-1)
print(factorial(5)) # Output: 120
Definition: OOP organizes programs around objects that combine data and behavior. It
supports concepts like encapsulation, inheritance, and polymorphism.
Example in Java:
class Animal {
public void makeSound() {
System.out.println("Animal makes sound");
}
}
2. Declarative Paradigm
The declarative paradigm focuses on describing what a program should accomplish, without
explicitly specifying how to do it. The system takes care of the underlying control flow.
a) Functional Programming
Definition: Programs treat computation as the evaluation of mathematical functions and avoid
changing state or mutable data.
def factorial(n):
return 1 if n == 0 else n * factorial(n-1)
result = factorial(5)
print(result) # Output: 120
b) Logic Programming
Definition: Logic programming involves writing facts and rules, and the system derives answers
through logical inference.
Example: prolog
2. Markup Languages:
HTML
HyperText Markup Language (HTML) is perhaps the most widely used markup language today.
It is mainly used to develop the web pages we see on the World Wide Web. Essentially, every
web page can be written using a version of HTML. That makes the code critical in ensuring
that the text and images on a website follow proper formatting. Without it, browsers would have
no clue how the content should be displayed.
HTML is also responsible for giving web pages their basic structure. It is often used with
Cascading Style Sheets (CSS) to improve page appearance.
XML
eXtensible Markup Language (XML) is highly similar to HTML. It allows browsers to display
and interpret information correctly. But as its name implies, XML is extensible. It permits a tag
to define itself based on a given description of the content rather than just display it.
SGML
Standard Generalized Markup Language (SGML) is an International Organization for
Standardization (ISO) standard that provides a general structure for all markup languages. It
outlines the rules used to validate and parse markups. Note, though, that not all markup
languages, such as HTML5, adhere to the SGML standard.
Scripting Languages
Scripting languages are a specific kind of computer languages that you can use to give
instructions to other software, such as a web browser, server, or standalone application. They
are built on the top of progamming languages. Many of today’s most popular coding languages
are scripting languages, such as JavaScript, PHP, Ruby, Python, and several others.
As scripting languages make coding simpler and faster, it’s not surprising that they are widely
used in web development.
Server Side Scripting:
server-side scripting is any scripting method that may operate on a web server. When a
browser requests a page with server-side scripting, the web server evaluates the script before
delivering the page to the browser. In this case, script processing may entail collecting
information from a database, performing simple computations, or selecting the relevant
material to be shown on the client end. The output is provided to the web browser when the
script is processed. The web server hides the scripts from the end user until the content is
delivered, making the data and source code safer.
• Server-side scripting languages are Python, PHP, Ruby etc.
Program development
Programming is the process of creating a set of instructions that tell a computer how to
perform a task. Programming can be done using a variety of computer "languages," such as
SQL, Java, Python, and C++.
Syntax refers to the spelling and grammar of a programming language. Computers are
inflexible machines that understand what you type only if you type it in the exact form that the
computer expects. The expected form is called the syntax. Program with syntax errors cannot
execute.
A logic error (or logical error) is a mistake in a program's source code that results in incorrect
or unexpected behavior. It is a type of runtime error that may simply produce the wrong output
or may cause a program to crash while running. Many different types of programming mistakes
can cause logic errors
Program Development Cycle (PDLC) is a methodology that software engineers and product
teams use to develop quality software. It provides a plan that breaks down program
development into manageable stages and tasks. Each stage and task must be successfully
completed before moving on to the next.
It may seem at first that PDLC is a sequential and linear process, but it actually requires a lot
of interactions and iterations. It requires continual trial and error until you land on a program
plan that works. There are six steps for program development life cycle. They are as follows:
1. Problem Definition
The first step in the program development cycle is to define the problem. This is done by
identifying and understanding why is the program or software developed. Usually, it’s in the
form of a program specification. In larger development teams, the system analyst is
responsible for this step.
The program specification defines the problem statement, what is required from the software
development team, and what is the output of the solution to the problem they’ve been tasked
with solving.
2. Program Design
The next step in the process is to design the program itself. This process starts by focusing on
the program's main goal, which the team defined in the previous step. The goal is then broken
down into manageable parts, all of which play a different role in helping achieve the goal.
The first step in designing a program is to identify the main routine of the program. Then, the
main routine is divided into smaller parts called modules. A lead software developer should
draw up a conceptual plan for each module to visualize how it will help in the overall process.
Depending on the module, people use different types of program design tools. The five major
ones are algorithms, structure charts, flowcharts, decision tables, and pseudocode.
Algorithms
An algorithm is a step-by-step procedure used to solve a problem in the easiest way possible.
An algorithm is an exact list of instructions and can be found in everyday life, not just in software
engineering.
Flowcharts
A flowchart is a diagram showing the logic of the program. It can also be considered a pictorial
representation of an algorithm. Each step of the algorithm is represented in the form of various
shapes of boxes, with the logical flow indicated by interconnecting arrows.
Once the design program process is complete, the next step is to write the code in one or more
programming languages, e.g., Java, .NET, Ruby, or whichever language works for the specific
program.
Usually, coding itself is generally a small part of the entire PDLC. This step is completed once
the entire program is codded and there are no syntax errors.
Even though one of the requirements to move onto this step is an error-free program,
sometimes errors still occur. This is why the program is tested in this stage to find any logic,
syntax, and other types of errors. The testing can be done internally, called alpha testing, or
externally, called beta testing.
Once the errors have been found, the development team steps in to fix them.
After the testing is complete, the PDLC has reached its final stages. All the structure charts,
flowcharts, decision tables, and pseudocode that were designed and used during the design
phase are now part of the documentation that other people involved in the software project can
use.
This phase is complete once the people working on it write a manual that includes an overview
of the program, its functionalities, a beginner tutorial, explanations of significant features and
all program commands, and a description of any error messages the program can generate.
The final step involves deploying the program for the customer. Usually, the development team
keeps a tab on the project for some time, as this is usually the stage where actual usage
problems can be seen.
This stage can last indefinitely, as the software needs to be maintained and upgraded regularly.
Algorithms
The Algorithm designed are language-independent, i.e. they are just plain instructions that can
be implemented in any language, and yet the output will be the same, as expected.
As one would not follow any written instructions to cook the recipe, but only the standard one.
Similarly, not all written instructions for programming are an algorithm. For some instructions
to be an algorithm, it must have the following characteristics:
• Clear and Unambiguous: The algorithm should be unambiguous. Each of its steps
should be clear in all aspects and must lead to only one meaning.
• Well-Defined Outputs: The algorithm must clearly define what output will be yielded
and it should be well-defined as well. It should produce at least 1 output.
• Finite-ness: The algorithm must be finite, i.e. it should terminate after a finite time.
• Feasible: The algorithm must be simple, generic, and practical, such that it can be
executed with the available resources. It must not contain some future technology or
anything.
A flowchart is the graphical or pictorial representation of an algorithm with the help of different
symbols, shapes, and arrows to demonstrate a process or a program. With algorithms, we can
easily understand a program. The main purpose of using a flowchart is to analyze different
methods.
Input / Output
Process / Instruction
Decision
Connector / Arrow
The symbols above represent different parts of a flowchart. The process in a flowchart can be
expressed through boxes and arrows with different sizes and colors. In a flowchart, we can
easily highlight certain elements and the relationships between each part.
A data structure is a specific way forr organizing and storing data.There are several basic
and advanced types of data structures, all designed to arrange data to suit a specific
purpose. Data structures make it easy for users to access and work with the data they need
in appropriate ways.
The data structure type used in a particular situation is determined by the type of operations
that will be required or the kinds of algorithms that will be applied. The various data structure
types include the following:
b)Stack: A stack stores a collection of items in the linear order which operations are applied.
A stack is a linear data structure that follows the Last-In-First-Out (LIFO) principle, which
means that the last element added to the stack is the first one to be removed.
Stack Operations:
• push(): When this operation is performed, an element is inserted into the stack.
• pop(): When this operation is performed, an element is removed from the top of the
stack and is returned.
C)Queue: A queue is a linear data structure that follows the First-In-First-Out (FIFO)
principle. In a queue, the first element added is the first one to be removed.
Queue Operations:
• Enqueue(): Adds (or stores) an element to the end of the queue..
• Dequeue(): Removal of elements from the queue.
d)Linked list: A Linked List is a linear data structure which looks like a chain of nodes, where
each node contains a data field and a reference(link) to the next node in the list.
Example: File systems on your computer are often represented as trees, where each folder
can contain multiple subfolders or files.
b) Graph. A graph is a collection of nodes (also called vertices) connected by edges. Unlike
trees, graphs can have cycles (loops) and can connect nodes in various ways.
Characteristics:
• Nodes and edges: Each node represents an item, and edges represent the connections
or relationships.
Example: Representing networks, like social networks (friends connected to each other)