Computer Programming Module 1 and 2
Computer Programming Module 1 and 2
Computer Programming Module 1 and 2
Computer Programming
This is a property of
PRESIDENT RAMON MAGSAYSAY STATE UNIVERSITY
NOT FOR SALE
TT4B CT - Basic Computer Programming
First Edition, 2021
Copyright. Republic Act 8293 Section 176 provides that “No copyright shall subsist in any work of the
Government of the Philippines. However, prior approval of the government agency or office wherein the
work is created shall be necessary for exploitation of such work for profit. Such an agency or office may,
among other things, impose as a condition the payment of royalties.
Borrowed materials included in this module are owned by their respective copyright holders. Every effort
has been exerted to reach and seek permission to use these materials from their respective copyright owners.
The University and authors do not claim ownership over them.
Evaluators:
The University LMS will be used for asynchronous learning and assessment. The link and class
code for LMS will be provided at the start of class through the class’ official Facebook Group.
● Edmodo
● Google Classroom
● University LMS (SIAS)
Students will be assessed on a regular basis thru quizzes, long/unit/chapter tests, individual/group
outputs using synchronous and/or asynchronous modalities or submission of SLM exercises.
Rubrics are also provided for evaluation of individual/group outputs.
Major examinations will be given as scheduled. The scope and coverage of the examination will
be based on the lessons/topics as plotted in the course syllabus.
0323
Module Overview
Introduction
This module seeks to improve students' competency and technical knowledge through multimodal
exercises that allow them to better grasp the different approaches and techniques on basic
programming using C language
This module also aims to emphasize the need of safe working practices.
Table of Contents
Chapter 7 Arrays
Chapter 8 Functions
Basic Computer Programming
Chapter 1
Introduction to Computer
Programming
Chapter 1
Introduction to Computer Programming
Introduction
Before getting into computer programming, let us first understand computer programs and what
they do. The process of designing and writing computer programs is known as computer
programming. It contains a wide range of jobs and procedures as a skill set, but our courses are not
intended to teach you everything. Instead, they are intended to give fundamental, practical skills to
assist you in understanding and writing computer code that represents what you see and use in the
real world. This Chapter provides you with the foundational skill set required to write computer
programs.
Specific Objectives
Duration
INTRODUCTION
*The two important terms that we have used in the above definition are –
• Sequence of instructions
• Computer Programming Language
To understand these terms, consider a situation when someone asks you about how to go to a
nearby 7/11. What exactly do you do to tell him the way to go to 7/11?
something as follows –
First go straight, after 500 meters , turn left then walk for another 10 meters,
and you will see their signage just across the street.
cross on the pedestrian’s crosswalk and just several steps to the right ,
that’s the 7/11.
Here, you have used English Language to give several steps to be taken to reach
7/11. If they are followed in the following sequence, then you will reach 7/11
Step 1.Go straight
Step 2.Take a 50 meters walk
Step 3.Then turn left
Step 4.walk another 10 meters , you will see their Signage across the street
Step 5.cross on the pedestrian’s crosswalk
Step 6.just several steps to the right, that’s the 7/11.
Now, try to map the situation with a computer program. The above sequence of instructions is
actually a Human Program written in English Language, which instructs on how to reach 7/11
from a given starting point. This same sequence could have been given in Spanish, Tagalog,
Japanese, or any other human language, provided the person seeking direction knows any of
these languages.
Now, let's go back and try to understand a computer program, which is a sequence of
instructions written in a Computer Language to perform a specified task by the computer.
Following is a simple program written in C programming Language
#include <stdio.h>
int main()
{
printf("Hello World!");
return 0;
}
A computer program is also called a computer software or application software, which can range
from two lines to millions of lines of instructions. Computer program instructions are also called
program source code and computer programming is also called program coding. Source code is
the actual lines of codes readable to human being. It needs to be compiled to an executable file
for it to run.
*A computer without a computer program is just a dump box; it is programs that make computers
active.
When a program is created, it's compiled into a language that the computer can understand.
Once compiled, the program does not need any other programs to run as long as the computer
has the required operating system and platform. A script is not compiled and needs an interpreter
to translate the script into something the computer understands. Without an interpreter, the
script cannot run on the computer. However, once installed, a script can run on any platform
without needing to be re-written.
A program file must be an executable file and for software programs running Microsoft Windows
end with a file extension of .EXE, .COM, or .PIF. Executing these files runs the program and allows
it to be used on the computer. On an Apple Macintosh computer, a program ends with .APP
Application software (an application) is a set of computer programs designed to permit the user
to perform a group of coordinated functions, tasks, or activities. Application software cannot run
on itself but is dependent on system software to execute. Program- A set of instructions telling a
computer what to do.
Uses of Computer Programs Today
Computer programs are being used in almost every field, household, agriculture, medical,
entertainment, defense, communication, etc. Listed below are a few applications of computer
programs − MS Word, MS Excel, Adobe Photoshop, Internet Explorer, Chrome, etc., are examples
of computer programs. Computer programs are being used to develop graphics and special
effects in movie making. Computer programs are being used to perform Ultrasounds, X-Rays, and
other medical examinations. Computer programs are being used in our mobile phones for SMS,
Chat, and voice communication.
If you understood what a computer program is, then we will say: the act of writing computer
programs is called computer programming.
The source code of a program is written in one or more languages that are intelligible to
programmers, rather than machine code, which is directly executed by the CPU. The purpose of
programming is to find a sequence of instructions that will automate the performance of a task
(which can be as complex as an operating system) on a computer, often for solving a given
problem. Proficient programming thus often requires expertise in several different subjects,
including knowledge of the application domain, specialized algorithms, and formal logic.
• testing,
• debugging,
• source code maintenance,
• implementation of build systems,
• and management of derived artifacts, such as the machine code of computer programs.
These might be considered part of the programming process, but often the term software
development is used for this larger process with the term programming, implementation, or
coding reserved for the actual writing of code.
QUALITY REQUIREMENTS
Whatever the approach to development may be, the final program must satisfy some
fundamental properties. The following properties are among the most important:
Reliability
Robustness
Usability/User Friendliness
Portability
Maintainability
Efficiency/performance
Reliability: how often the results of a program are correct. This depends on conceptual
correctness of algorithms, and minimization of programming mistakes, such as mistakes in
resource management (e.g., buffer overflows and race conditions) and logic errors (such as
division by zero or off-by-one errors).
Robustness: how well a program anticipates problems due to errors (not bugs). This includes
situations such as incorrect, inappropriate or corrupt data, unavailability of needed resources
such as memory, operating system services and network connections, user error, and unexpected
power outages.
Usability / User Friendliness: the ergonomics of a program: the ease with which a person can use
the program for its intended purpose or in some cases even unanticipated purposes. Such issues
can make or break its success even regardless of other issues. This involves a wide range of
textual, graphical and sometimes hardware elements that improve the clarity, intuitiveness,
cohesiveness and completeness of a program's user interface.
Portability: the range of computer hardware and operating system platforms on which the source
code of a program can be compiled/interpreted and run. This depends on differences in the
programming facilities provided by the different platforms, including hardware and operating
system resources, expected behavior of the hardware and operating system, and availability of
platform specific compilers (and sometimes libraries) for the language of the source code.
Maintainability: the ease with which a program can be modified by its present or future
developers in order to make improvements or customizations, fix bugs and security holes, or
adapt it to new environments. Good practices during initial development make the difference in
this regard. This quality may not be directly apparent to the end user but it can significantly affect
the fate of a program over the long term.
In computer programming, readability refers to the ease with which a human reader can
comprehend the purpose, control flow, and operation of source code. It affects the aspects of
quality above, including portability, usability and most importantly maintainability. Readability is
important because programmers spend the majority of their time reading, trying to understand
and modifying existing source code, rather than writing new source code. Unreadable code often
leads to bugs, inefficiencies, and duplicated code. A study found that a few simple readability
transformations made code shorter and drastically reduced the time to understand it.
Following a consistent programming style often helps readability. However, readability is more
than just programming style. Many factors, having little or nothing to do with the ability of the
computer to efficiently compile and execute the code, contribute to readability. Some of these
factors include:
The presentation aspects of this (such as indents, line breaks, color highlighting, and so on) are
often handled by the source code editor, but the content aspects reflect the programmer's
talent and skills. Various visual programming languages have also been developed with the
intent to resolve readability concerns by adopting non-traditional approaches to code structure
and display. Integrated development environments (IDEs) aim to integrate all such help.
Techniques like Code refactoring can enhance readability.
COMPUTER PROGRAMMERS
They those who write computer software. Their jobs usually involve:
A programming language is a vocabulary and set of grammatical rules for instructing a computer
or computing device to perform specific tasks. The term programming language usually refers to
highlevel languages, such as BASIC, C, C++, COBOL, Java, FORTRAN, Ada, Pascal, Python, PHP, Perl,
Ruby etc. Each programming language has a unique set of keywords (words that it understands)
and a special syntax for organizing program instructions.
Programming Languages
Trade-offs from this ideal involve finding enough programmers who know the language to build
a team, the availability of compilers for that language, and the efficiency with which programs
written in a given language execute. Languages form an approximate spectrum from "low-level"
to "high-level"; "low-level" languages are typically more machine-oriented and faster to execute,
whereas "high-level" languages are more abstract and easier to use but execute less quickly. It is
usually easier to code in "high-level" languages than in "lowlevel" ones.
The details look different in different languages, but a few basic instructions appear in just about
every language:
Input: Gather data from the keyboard, a file, or some other device.
Output: Display data on the screen or send data to a file or other device.
Arithmetic: Perform basic arithmetical operations like addition and multiplication.
Conditional Execution: Check for certain conditions and execute the appropriate sequence of
statements.
Repetition: Perform some action repeatedly, usually with some variation.
There are five levels of programming language. Used in their respective generation. Each
generation is an improvement of the latter generation.
• Machine Language (1st Generation PL)
• Assembly Language (2nd Generation PL)
• High Level Language (3rd Generation PL
• Very High Level Language (4th Generation PL)
• Natural Language (4th Generation PL)
Machine Language
( 1st Generation Prog. Language )
Lowest level programming language.
It’s represented by 1s and 0s.
A very tedious task for just a simple task, the program code required would be very long
Assembly Language
( 2nd Generation Prog. Language )
Also considered as low level language.
This language is easier to use than Machine language.
Instead of using 1s and 0s, this language use mnemonic codes( abbreviations that are easy to
remember).
Syntax is the set of rules that define what the various combinations of symbols mean. This tells
the computer how to read the code. Syntax refers to a concept in writing code dealing with a very
specific set of words and a very specific order to those words when we give the computer
instructions. This order and this strict structure is what enables us to communicate effectively
with a computer.
In other words, it means using character structures that a computer can interpret. For example,
if a user tries to execute a command without proper syntax, it generates syntax error, usually
causing the program to fail.
In a text editor that supports syntax highlighting, the programming language's syntax elements
(keywords, variable names, operators, etc.) are colored, making it easier to read the code.
EX. VS Code, Brackets, UltraEdit, BBEdit, Atom, Textmate, Sublime Text, Notepad++
A big difference though is that computers are really exacting in how we structure that grammar
or our syntax.
LEVELS OF SYNTAX
Semantics is a linguistic concept separate from the concept of syntax, which is also often related
to attributes of computer programming languages. The idea of semantics is that the linguistic
representations or symbols support logical outcomes, as a set of words and phrases signify ideas
to both humans and machines.
*reveals the meaning of syntactically valid strings in a language.
In computer science, Semantics is frequently used to differentiate the meaning of an instruction
from its format. The format, which covers the spelling of language components and the rules
controlling how components are combined, is called the language's syntax. For example, if you
misspell a command, it is a syntax error. If, on the other hand, you enter a legal command that
does not make any sense in the current context, it is a semantic error.
Pragmatics alludes to those aspects of language that involve the users of the language, namely
psychological and sociological phenomena such as utility, scope of application, and effects on the
users. For programming languages, pragmatics includes issues such as ease of implementation,
efficiency in application, and programming methodology.
PROGRAMMING ENVIRONMENT
Though Environment Setup is not an element of any Programming Language, it is the first step to
be followed before setting on to write a program.
ENVIRONMENT IN PROGRAMMING
When we say Environment Setup, it simply implies a base on top of which we can do our
programming. Thus, we need to have the required software setup, i.e., installation on our PC
which will be used to write computer programs, compile, and execute them. For example, if you
need to browse Internet, then you need the following setup on your machine –
Similarly, you will need the following setup to start with programming using any programming
language.
TEXT EDITOR
A text editor is a software that is used to write computer programs.
Your Windows machine must have a Notepad, which can be used to type programs. You can
launch it by following these steps –
COMPILERS
You write your computer program using your favorite programming language and save it in a text
file called the program file
Interpreter
There are other programming languages such as Python, PHP, and Perl, which do not need any
compilation into binary format, rather an interpreter can be used to read such programs line by
line and execute them directly without any further conversion.
INTEGRATED DEVELOPMENT ENVIRONMENT
An integrated development environment (IDE) is software for building applications that combines
common developer tools into a single graphical user interface (GUI). An IDE typically consists of:
• Debugger
• A text editor that can assist in writing software code with features such as syntax
highlighting with visual cues, providing language specific auto-completion, and checking
for bugs as code is being written
• Utilities that automate simple, repeatable tasks as part of creating a local build of the
software for use by the developer, like compiling computer source code into binary code,
packaging binary code, and running automated tests.
Debugger
• A program for testing other programs that can graphically display the location of a bug in
the original code.
ACTIVITY 1
Direction: Identify what category of computer user is being described in each item.
________________1. It is the act or process of creating a mobile app for mobile devices such
personal digital assistants, business digital assistants, or cell phones.
________________2. It is a mobile operating system conceived and developed solely for
Apple Inc. devices. Many of Apple's mobile devices, including the
iPhone and iPod Touch, run on this operating system.
________________3. It is a touchscreen mobile operating system based on a modified
version of the Linux kernel and other open source applications, aimed
particularly for smartphones and tablets. It was created by the Open
Handset Alliance, a group of developers, and is commercially
supported by Google.
________________4. TCL Corporation has declared that they would discontinue
manufacturing the smartphones on August 31, 2020. Key2LE is the
most recent phone to be developed.
________________5. It is a discontinued mobile operating system developed by Microsoft.
________________6. These can be created in a choice of programming languages and
frameworks, but they must be compiled into native applications that
operate on the device's operating system.
________________7. They're made with common web technologies like JavaScript, CSS,
and HTML5, and come packaged as app installation packages.
________________8. By avoiding app store distribution and installation, these apps provide
an alternative to typical mobile app creation.
________________9. These are created in the platform owner's programming language and
frameworks and run directly on the device's operating system, such as
iOS and Android.
________________10. True or False: Learning the needed programming language is the
initial step toward developing mobile apps. For other platforms, it will
be different. As a result, you must first choose an operating system.
Learner’s Feedback Form
Name of Student: ___________________________________________________
Program : ___________________________________________________
Year Level : ___________ Section : ___________
Faculty : ___________________________________________________
Schedule : ___________________________________________________
In what particular portion of this learning packet, you feel that you are struggling or lost?
______________________________________________________________________________
______________________________________________________________________________
_____________________________________________________________________
To further improve this learning packet, what part do you think should be enhanced?
______________________________________________________________________________
______________________________________________________________________________
_____________________________________________________________________
NOTE: This is an essential part of course module. This must be submitted to the subject teacher
(within the 1st week of the class).
Basic Computer Programming
Chapter 2
Software Development
Life Cycles
Chapter 2
By the end of this presentation, the students will develop a comprehensive understanding of SDLC
and its related concepts and will be able to select and follow the right model for any given Software
project.
Specific Objectives
Duration
What is SDLC?
SDLC stands for Software Development Life Cycle. SDLC is a process that consists of a series of
planned activities to develop or alter the Software Products. This tutorial will give you an overview
of the SDLC basics, SDLC models available and their application in the industry. This tutorial also
elaborates on other related methodologies like Agile, RAD and Prototyping.
The life cycle defines a methodology for improving the quality of software and the overall
development process.
• SDLC is the acronym of Software Development Life Cycle.
• It is also called as Software Development Process.
• SDLC is a framework defining tasks performed at each step in the software development
process.
• ISO/IEC 12207 is an international standard for software life-cycle processes. It aims to be
the standard that defines all the tasks required for developing and maintaining software.
The following figure is a graphical representation of the various stages of a typical SDLC.
Planning
Deployment Defining
Testing Designing
Building
A typical Software Development Life Cycle consists of the following stages −
Stage 1: Planning and Requirement Analysis
Stage 2: Defining Requirements
Stage 3: Designing the Product Architecture
Stage 4: Building or Developing the Product
Stage 5: Testing the Product
Stage 6: Deployment and Maintenance
SDLC Models
There are various software development life cycle models defined and designed which are
followed during the software development process. These models are also referred as Software
Development Process Models. Each process model follows a Series of steps unique to its type to
ensure success in the process of software development.
Following are the most important and popular SDLC models followed in the industry −
Waterfall Model Iterative Model
Spiral Model V-Model
Big Bang Model Agile Model
RAD Model Prototyping Models
Waterfall Model
The Waterfall Model was the first Process Model to be introduced. It is also referred to as a linear-
sequential life cycle model. It is very simple to understand and use. In a waterfall model, each
phase must be completed before the next phase can begin and there is no overlapping in the
phases.
The Waterfall model is the earliest SDLC approach that was used for software development.
The waterfall Model illustrates the software development process in a linear sequential flow. This
means that any phase in the development process begins only if the previous phase is complete.
In this waterfall model, the phases do not overlap.
Waterfall Model – Design
Waterfall approach was first SDLC Model to be used widely in Software Engineering to ensure
success of the project. In "The Waterfall" approach, the whole process of software development
is divided into separate phases. In this Waterfall model, typically, the outcome of one phase acts
as the input for the next phase sequentially.
The following illustration is a representation of the different phases of the Waterfall Model.
Requirement
Analysis
System Design
Implementation
Testing
Deployment
Maintenance
System Design
The requirement specifications from first phase are studied in this phase and the system design is
prepared. This system design helps in specifying hardware and system requirements and helps in
defining the overall system architecture.
Implementation
With inputs from the system design, the system is first developed in small programs called units,
which are integrated in the next phase. Each unit is developed and tested for its functionality,
which is referred to as Unit Testing.
Maintenance
There are some issues which come up in the client environment. To fix those issues, patches are
released. Also to enhance the product some better versions are released. Maintenance is done to
deliver these changes in the customer environment.
All these phases are cascaded to each other in which progress is seen as flowing steadily
downwards (like a waterfall) through the phases. The next phase is started only after the defined
set of goals are achieved for previous phase and it is signed off, so the name "Waterfall Model".
Every software developed is different and requires a suitable SDLC approach to be followed based
on the internal and external factors.
Some situations where the use of Waterfall model is most appropriate are −
Requirements are very well documented, clear and fixed.
Product definition is stable.
Technology is understood and is not dynamic.
There are no ambiguous requirements.
Ample resources with required expertise are available to support the product.
The project is short.
The disadvantage of waterfall development is that it does not allow much reflection or revision.
Once an application is in the testing stage, it is very difficult to go back and change something that
was not well-documented or thought upon in the concept stage.
Iterative Model
In the Iterative model, iterative process starts with a simple implementation of a small set of the
software requirements and iteratively enhances the evolving versions until the complete system
is implemented and ready to be deployed.
An iterative life cycle model does not attempt to start with a full specification of requirements.
Instead, development begins by specifying and implementing just part of the software, which is
then reviewed to identify further requirements. This process is then repeated, producing a new
version of the software at the end of each iteration of the model.
Design and
Testing Implementation
Development
Design and
Testing Implementation
Development
Design and
Testing Implementation
Development
Iterative and Incremental development is a combination of both iterative design or iterative
method and incremental build model for development. "During software development, more than
one iteration of the software development cycle may be in progress at the same time." This
process may be described as an "evolutionary acquisition" or "incremental build" approach."
In this incremental model, the whole requirement is divided into various builds. During each
iteration, the development module goes through the requirements, design, implementation and
testing phases. Each subsequent release of the module adds function to the previous release. The
process continues till the complete system is ready as per the requirement.
The key to a successful use of an iterative software development lifecycle is rigorous validation of
requirements, and verification & testing of each version of the software against those
requirements within each cycle of the model. As the software evolves through successive cycles,
tests must be repeated and extended to verify each version of the software.
IterativeModel – Application
Like other SDLC models, Iterative and incremental development has some specific applications in
the software industry.
This model is most often used in the following scenarios −
• Requirements of the complete system are clearly defined and understood.
• Major requirements must be defined; however, some functionalities or requested
enhancements may evolve with time.
• There is a time to the market constraint.
• A new technology is being used and is being learnt by the development team while working
on the project.
• Resources with needed skill sets are not available and are planned to be used on contract
basis for specific iterations.
• There are some high-risk features and goals which may change in the future.
The advantages of the Iterative and Incremental SDLC Model are as follows −
Some working functionality can be developed quickly and early in the life cycle.
Results are obtained early and periodically.
Parallel development can be planned.
Progress can be measured.
Less costly to change the scope/requirements.
Testing and debugging during smaller iteration is easy.
Risks are identified and resolved during iteration; and each iteration is an easily managed
milestone.
Easier to manage risk - High risk part is done first.
With every increment, operational product is delivered.
Issues, challenges and risks identified from each increment can be utilized/applied to the
next increment.
Risk analysis is better.
It supports changing requirements.
Initial Operating time is less.
Better suited for large and mission-critical projects.
During the life cycle, software is produced early which facilitates customer evaluation and
feedback.
The disadvantages of the Iterative and Incremental SDLC Model are as follows −
Not suitable for smaller projects.
Management complexity is more.
End of project may not be known which is a risk.
Highly skilled resources are required for risk analysis.
Projects progress is highly dependent upon the risk analysis phase.
More resources may be required.
Although cost of change is lesser, but it is not very suitable for changing requirements.
More management attention is required.
System architecture or design issues may arise because not all requirements are gathered
in the beginning of the entire life cycle.
Defining increments may require definition of the complete system.
The spiral model combines the idea of iterative development with the systematic, controlled
aspects of the waterfall model. This Spiral model is a combination of iterative development
process model and sequential linear development model i.e. the waterfall model with a very
high emphasis on risk analysis. It allows incremental releases of the product or incremental
refinement through each iteration around the spiral.
The spiral model has four phases. A software project repeatedly passes through these phases in
iterations called Spirals.
• Identification
• Design
• Construct or Build
• Evaluation and Risk Analysis
Identification
• This phase starts with gathering the business requirements in the baseline spiral. In the
subsequent spirals as the product matures, identification of system requirements,
subsystem requirements and unit requirements are all done in this phase.
• This phase also includes understanding the system requirements by continuous
communication between the customer and the system analyst. At the end of the spiral,
the product is deployed in the identified market.
Design
• The Design phase starts with the conceptual design in the baseline spiral and involves
architectural design, logical design of modules, physical product design and the final
design in the subsequent spirals.
Construct or Build
• The Construct phase refers to production of the actual software product at every spiral.
In the baseline spiral, when the product is just thought of and the design is being
developed a POC (Proof of Concept) is developed in this phase to get customer feedback.
• Then in the subsequent spirals with higher clarity on requirements and design details a
working model of the software called build is produced with a version number. These
builds are sent to the customer for feedback.
Evaluation and Risk Analysis
• Risk Analysis includes identifying, estimating and monitoring the technical feasibility and
management risks, such as schedule slippage and cost overrun. After testing the build, at
the end of first iteration, the customer evaluates the software and provides feedback.
The following illustration is a representation of the Spiral Model, listing the activities in each
phase.
Based on the customer evaluation, the software development process enters the next iteration
and subsequently follows the linear approach to implement the feedback suggested by the
customer. The process of iterations along the spiral continues throughout the life of the
software.
Spiral Model – Application
The Spiral Model is widely used in the software industry as it is in sync with the natural
development process of any product, i.e. learning with maturity which involves minimum risk for
the customer as well as the development firms.
The advantage of spiral lifecycle model is that it allows elements of the product to be added in,
when they become available or known. This assures that there is no conflict with previous
requirements and design.
This method is consistent with approaches that have multiple software builds and releases
which allows making an orderly transition to a maintenance activity. Another positive aspect of
this method is that the spiral model forces an early user involvement in the system development
effort.
On the other side, it takes a very strict management to complete such products and there is a
risk of running the spiral in an indefinite loop. So, the discipline of change and the extent of
taking change requests is very important to develop and deploy the product successfully.
The V-model is an SDLC model where execution of processes happens in a sequential manner in
a V-shape. It is also known as Verification and Validation model.
V-Model – Design
The V-Model is an extension of the waterfall model and is based on the association of a testing
phase for each corresponding development stage. This means that for every single phase in the
development cycle, there is a directly associated testing phase. This is a highly-disciplined model
and the next phase starts only after completion of the previous phase.
Under the V-Model, the corresponding testing phase of the development phase is planned in
parallel. So, there are Verification phases on one side of the ‘V’ and Validation phases on the
other side. The Coding Phase joins the two sides of the V-Model.
The following illustration depicts the different phases in a V-Model of the SDLC.
There are several Verification phases in the V-Model, each of these are explained in detail
below.
• Business Requirement Analysis
• System Design
• Architectural Design
• Module Design
• Coding Phase
• Validation Phases
Business Requirement Analysis
This is the first phase in the development cycle where the product requirements are understood
from the customer’s perspective. This phase involves detailed communication with the customer
to understand his expectations and exact requirement. This is a very important activity and
needs to be managed well, as most of the customers are not sure about what exactly they need.
The acceptance test design planning is done at this stage as business requirements can be used
as an input for acceptance testing.
System Design
Once you have the clear and detailed product requirements, it is time to design the complete
system. The system design will have the understanding and detailing the complete hardware
and communication setup for the product under development. The system test plan is
developed based on the system design. Doing this at an earlier stage leaves more time for the
actual test execution later.
Architectural Design
Architectural specifications are understood and designed in this phase. Usually more than one
technical approach is proposed and based on the technical and financial feasibility the final
decision is taken. The system design is broken down further into modules taking up different
functionality. This is also referred to as High Level Design (HLD).
The data transfer and communication between the internal modules and with the outside world
(other systems) is clearly understood and defined in this stage. With this information,
integration tests can be designed and documented during this stage.
Module Design
In this phase, the detailed internal design for all the system modules is specified, referred to
as Low Level Design (LLD). It is important that the design is compatible with the other modules
in the system architecture and the other external systems. The unit tests are an essential part of
any development process and helps eliminate the maximum faults and errors at a very early
stage. These unit tests can be designed at this stage based on the internal module designs.
Coding Phase
The actual coding of the system modules designed in the design phase is taken up in the Coding
phase. The best suitable programming language is decided based on the system and
architectural requirements.
The coding is performed based on the coding guidelines and standards. The code goes through
numerous code reviews and is optimized for best performance before the final build is checked
into the repository.
Validation Phases
The different Validation Phases in a V-Model are explained in detail below.
• Unit Testing
• Integration Testing
• System Testing
• Acceptance Testing
Unit Testing
Unit tests designed in the module design phase are executed on the code during this validation
phase. Unit testing is the testing at code level and helps eliminate bugs at an early stage, though
all defects cannot be uncovered by unit testing.
Integration Testing
Integration testing is associated with the architectural design phase. Integration tests are
performed to test the coexistence and communication of the internal modules within the
system.
System Testing
System testing is directly associated with the system design phase. System tests check the entire
system functionality and the communication of the system under development with external
systems. Most of the software and hardware compatibility issues can be uncovered during this
system test execution.
Acceptance Testing
Acceptance testing is associated with the business requirement analysis phase and involves
testing the product in user environment. Acceptance tests uncover the compatibility issues with
the other systems available in the user environment. It also discovers the non-functional issues
such as load and performance defects in the actual user environment.
V- Model ─ Applica on
V- Model application is almost the same as the waterfall model, as both the models are of
sequential type. Requirements have to be very clear before the project starts, because it is
usually expensive to go back and make changes. This model is used in the medical development
field, as it is strictly a disciplined domain.
The following pointers are some of the most suitable scenarios to use the V-Model application.
• Requirements are well defined, clearly documented and fixed.
• Product definition is stable.
• Technology is not dynamic and is well understood by the project team.
• There are no ambiguous or undefined requirements.
• The project is short.
V-Model - Pros and Cons
The advantage of the V-Model method is that it is very easy to understand and apply. The
simplicity of this model also makes it easier to manage. The disadvantage is that the model is not
flexible to changes and just in case there is a requirement change, which is very common in
today’s dynamic world, it becomes very expensive to make the change.
The Big Bang model is an SDLC model where we do not follow any specific process. The
development just starts with the required money and efforts as the input, and the output is the
software developed which may or may not be as per customer requirement. This Big Bang
Model does not follow a process/procedure and there is a very little planning required. Even the
customer is not sure about what exactly he wants and the requirements are implemented on
the fly without much analysis.
Usually this model is followed for small projects where the development teams are very small.
The Big Bang Model comprises of focusing all the possible resources in the software
development and coding, with very little or no planning. The requirements are understood and
implemented as they come. Any changes required may or may not need to revamp the complete
software.
This model is ideal for small projects with one or two developers working together and is also
useful for academic or practice projects. It is an ideal model for the product where requirements
are not well understood and the final release date is not given.
Big Bang Model - Pros and Cons
The advantage of this Big Bang Model is that it is very simple and requires very little or no
planning. Easy to manage and no formal procedure are required.
However, the Big Bang Model is a very high risk model and changes in the requirements or
misunderstood requirements may even lead to complete reversal or scraping of the project. It is
ideal for repetitive or small projects with minimum risks.
AGILE MODEL
Agile SDLC model is a combination of iterative and incremental process models with focus on
process adaptability and customer satisfaction by rapid delivery of working software product.
Agile Methods break the product into small incremental builds. These builds are provided in
iterations. Each iteration typically lasts from about one to three weeks.
Every iteration involves cross functional teams working simultaneously on various areas like −
• Planning
• Requirements Analysis
• Design
• Coding
• Unit Testing and
• Acceptance Testing.
At the end of the iteration, a working product is displayed to the customer and important
stakeholders.
Agile model believes that every project needs to be handled differently and the existing methods
need to be tailored to best suit the project requirements. In Agile, the tasks are divided to time
boxes (small time frames) to deliver specific features for a release.
Iterative approach is taken and working software build is delivered after each iteration. Each
build is incremental in terms of features; the final build holds all the features required by the
customer.
The Agile thought process had started early in the software development and started becoming
popular with time due to its flexibility and adaptability.
The most popular Agile methods include Rational Unified Process (1994), Scrum (1995), Crystal
Clear, Extreme Programming (1996), Adaptive Software Development, Feature Driven
Development, and Dynamic Systems Development Method (DSDM) (1995). These are now
collectively referred to as Agile Methodologies, after the Agile Manifesto was published in 2001.
Agile is based on the adaptive software development methods, whereas the traditional SDLC
models like the waterfall model is based on a predictive approach. Predictive teams in the
traditional SDLC models usually work with detailed planning and have a complete forecast of the
exact tasks and features to be delivered in the next few months or during the product life cycle.
Predictive methods entirely depend on the requirement analysis and planning done in the
beginning of cycle. Any changes to be incorporated go through a strict change control
management and prioritization.
Agile uses an adaptive approach where there is no detailed planning and there is clarity on
future tasks only in respect of what features need to be developed. There is feature driven
development and the team adapts to the changing product requirements dynamically. The
product is tested very frequently, through the release iterations, minimizing the risk of any
major failures in future.
Customer Interaction is the backbone of this Agile methodology, and open communication with
minimum documentation are the typical features of Agile development environment. The agile
teams work in close collaboration with each other and are most often located in the same
geographical location.
Agile methods are being widely accepted in the software world recently. However, this method
may not always be suitable for all products. Here are some pros and cons of the Agile model.
RAD Model
The RAD (Rapid Application Development) model is based on prototyping and iterative
development with no specific planning involved. The process of writing the software itself
involves the planning required for developing the product.
Rapid Application Development focuses on gathering customer requirements through
workshops or focus groups, early testing of the prototypes by the customer using iterative
concept, reuse of the existing prototypes (components), continuous integration and rapid
delivery.
What is RAD?
RAD projects follow iterative and incremental model and have small teams comprising of
developers, domain experts, customer representatives and other IT resources working
progressively on their component or prototype.
The most important aspect for this model to be successful is to make sure that the prototypes
developed are reusable.
RAD Model Design
RAD model distributes the analysis, design, build and test phases into a series of short, iterative
development cycles.
Following are the various phases of the RAD Model −
• Business Modelling
• Data Modelling
• Process Modelling
• Application Generation
• Testing and Turnover
Business Modelling
The business model for the product under development is designed in terms of flow of
information and the distribution of information between various business channels. A complete
business analysis is performed to find the vital information for business, how it can be obtained,
how and when is the information processed and what are the factors driving successful flow of
information.
Data Modelling
The information gathered in the Business Modelling phase is reviewed and analyzed to form sets
of data objects vital for the business. The attributes of all data sets is identified and defined. The
relation between these data objects are established and defined in detail in relevance to the
business model.
Process Modelling
The data object sets defined in the Data Modelling phase are converted to establish the business
information flow needed to achieve specific business objectives as per the business model. The
process model for any changes or enhancements to the data object sets is defined in this phase.
Process descriptions for adding, deleting, retrieving or modifying a data object are given.
Application Generation
The actual system is built and coding is done by using automation tools to convert process and
data models into actual prototypes.
The traditional SDLC follows a rigid process models with high emphasis on requirement analysis
and gathering before the coding starts. It puts pressure on the customer to sign off the
requirements before the project starts and the customer doesn’t get the feel of the product as
there is no working build available for a long time.
The customer may need some changes after he gets to see the software. However, the change
process is quite rigid and it may not be feasible to incorporate major changes in the product in
the traditional SDLC.
The RAD model focuses on iterative and incremental delivery of working models to the
customer. This results in rapid delivery to the customer and customer involvement during the
complete development cycle of product reducing the risk of non-conformance with the actual
user requirements.
RAD model can be applied successfully to the projects in which clear modularization is possible.
If the project cannot be broken into modules, RAD may fail.
The following pointers describe the typical scenarios where RAD can be used −
• RAD should be used only when a system can be modularized to be delivered in an
incremental manner.
• It should be used if there is a high availability of designers for Modelling.
• It should be used only if the budget permits use of automated code generating tools.
• RAD SDLC model should be chosen only if domain experts are available with relevant
business knowledge.
• Should be used where the requirements change during the project and working
prototypes are to be presented to customer in small iterations of 2-3 months.
RAD model enables rapid delivery as it reduces the overall development time due to the
reusability of the components and parallel development. RAD works well only if high skilled
engineers are available and the customer is also committed to achieve the targeted prototype in
the given time frame. If there is commitment lacking on either side the model may fail.
The Software Prototyping refers to building software application prototypes which displays the
functionality of the product under development, but may not actually hold the exact logic of the
original software.
Software prototyping is becoming very popular as a software development model, as it enables
to understand customer requirements at an early stage of development. It helps get valuable
feedback from the customer and helps software designers and developers understand about
what exactly is expected from the product under development.
Prototype is a working model of software with some limited functionality. The prototype does
not always hold the exact logic used in the actual software application and is an extra effort to
be considered under effort estimation.
Prototyping is used to allow the users evaluate developer proposals and try them out before
implementation. It also helps understand the requirements which are user specific and may not
have been considered by the developer during product design.
Prototypes can have horizontal or vertical dimensions. A Horizontal prototype displays the user
interface for the product and gives a broader view of the entire system, without concentrating
on internal functions. A Vertical prototype on the other side is a detailed elaboration of a
specific function or a sub system in the product.
The purpose of both horizontal and vertical prototype is different. Horizontal prototypes are
used to get more information on the user interface level and the business requirements. It can
even be presented in the sales demos to get business in the market. Vertical prototypes are
technical in nature and are used to get details of the exact functioning of the sub systems. For
example, database requirements, interaction and data processing loads in a given sub system.
There are different types of software prototypes used in the industry. Following are the major
software prototyping types used widely −
• Throwaway/Rapid Prototyping
• Evolutionary Prototyping
• Incremental Prototyping
• Extreme Prototyping
Throwaway/Rapid Prototyping
Throwaway prototyping is also called as rapid or close ended prototyping. This type of
prototyping uses very little efforts with minimum requirement analysis to build a prototype.
Once the actual requirements are understood, the prototype is discarded and the actual system
is developed with a much clear understanding of user requirements.
Evolutionary Prototyping
Evolutionary prototyping also called as breadboard prototyping is based on building actual
functional prototypes with minimal functionality in the beginning. The prototype developed
forms the heart of the future prototypes on top of which the entire system is built. By using
evolutionary prototyping, the well-understood requirements are included in the prototype and
the requirements are added as and when they are understood.
Incremental Prototyping
Incremental prototyping refers to building multiple functional prototypes of the various sub-
systems and then integrating all the available prototypes to form a complete system.
Extreme Prototyping
Extreme prototyping is used in the web development domain. It consists of three sequential
phases. First, a basic prototype with all the existing pages is presented in the HTML format. Then
the data processing is simulated using a prototype services layer. Finally, the services are
implemented and integrated to the final prototype. This process is called Extreme Prototyping
used to draw attention to the second phase of the process, where a fully functional UI is
developed with very little regard to the actual services.
Software Prototyping is most useful in development of systems having high level of user
interactions such as online systems. Systems which need users to fill out forms or go through
various screens before data is processed can use prototyping very effectively to give the exact
look and feel even before the actual software is developed.
Software that involves too much of data processing and most of the functionality is internal with
very little user interface does not usually benefit from prototyping. Prototype development
could be an extra overhead in such projects and may need lot of extra efforts.
Software prototyping is used in typical cases and the decision should be taken very carefully so
that the efforts spent in building the prototype add considerable value to the final software
developed. The model has its own pros and cons discussed as follows.