You are on page 1of 35

Unit 1-Introduction to Programming Language

Language is a mode of communication that is used to share ideas, opinions with each other.
For example, if we want to teach someone, we need a language that is understandable by both
communicators.

A programming language is a computer language that is used by programmers (developers)


to communicate with computers. It is a set of instructions written in any specific language ( C,
C++, Java, Python) to perform a specific task. A programming language is mainly used
to develop desktop applications, websites, and mobile applications.

Types of programming language

1. Low-level programming language

Low-level language is machine-dependent (0s and 1s) programming language. The processor
runs low- level programs directly without the need of a compiler or interpreter, so the programs
written in low-level language can be run very fast. Low-level language is further divided into
two parts -

i. Machine Language

Machine language is a type of low-level programming language. It is also called as machine


code or object code. Machine language is easier to read because it is normally displayed in
binary or hexadecimal form (base 16) form. It does not require a translator to convert the
programs because computers directly understand the machine language programs.

The advantage of machine language is that it helps the programmer to execute the programs
faster than the high-level programming language.

ii. Assembly Language

Assembly language (ASM) is also a type of low-level programming language that is designed for
specific processors. It represents the set of instructions in a symbolic and human-
understandable form. It uses an assembler to convert the assembly language to machine
language.

The advantage of assembly language is that it requires less memory and less execution time to
execute a program.

2. High-level programming language

High-level programming language (HLL) is designed for developing user-friendly software


programs and websites. This programming language requires a compiler or interpreter to
translate the program into machine language (execute the program).
The main advantage of a high-level language is that it is easy to read, write, and maintain.

High-level programming language includes Python, Java, JavaScript, PHP, C#, C++,
Objective C, Cobol, Perl, Pascal, LISP, FORTRAN, and Swift programming language.

i) Third Generation language

 A third-generation programming language (3GL), is a programming language that is


machine-independent. Programs written in a 3GL can be compiled to run on many
different devices. Compare this to a first-generation programming language (machine
code), or a second-generation programming language (assembly language). In those
languages, the program is written specifically for a certain type of CPU and instruction
set.
 3GLs first appeared in the 1950s with the development of FORTRAN, ALGOL,
and COBOL. These languages are considered "high-level," even though they are a
much lower-level than modern high-level programming languages such as C++, Ruby,
and JavaScript.

ii) Fourth Generation Programming Languages

Fourth generation programming languages are designed to achieve a specific goal (such as to
develop commercial business applications). 4GL preceded 3rd generation programming
languages (which were already very user friendly). 4GL surpassed 3GL in user-friendliness and
its higher level of abstraction. This is achieved through the use of words (or phrases) that are
very close to English language, and sometimes using graphical constructs such as icons,
interfaces and symbols. By designing the languages according to the needs of the domains, it
makes it very efficient to program in 4GL. Furthermore, 4GL rapidly expanded the number of
professionals who engage in application development. Many fourth generation programming
languages are targeted towards processing data and handling databases, and are based on SQL.

iii) Fifth Generation Programming Languages

Fifth generation programming languages (which followed 4GL) are programming languages that
allow programmers to solve problems by defining certain constraints as opposed to writing an
algorithm. This means that 5GL can be used to solve problems without a programmer. Because
of this reason, 5GL are used in AI (Artificial Intelligence) research. Many constraint-based
languages, logic programming languages and some of the declarative languages are identified as
5GL. Prolog and Lisp are the most widely used 5GL for AI applications. In the early 90’s when
the 5GL came out, it was believed they would become the future of programming.

However, after realizing that the most crucial step (defining constraints) still needs human
intervention, the initial high expectations were lowered.
Language Processor
Mostly, high-level
level languages like Java, C++, Python, and more are used to write the programs,
called source code, as it is very uninteresting work to write a computer program directly in
machine code. These source codes need to translate into machine language to be executed
because they cannot be executed directly by the computer. Hence, a special translator system, a
language processor, is used to con
convert source code into machine language.

A language processor is a special type of software program that has the potential to translate the
program codes into machine codes.

Languages such as COBOL and Fortran have language processors, which are generally used to
perform tasks like processing source code to object code. A specific description of syntax,
lexicon, and semantics of a high--level
level language is required to design a language processor.

Types of language processors

There are mainly three kinds of language processors, which are discussed below:

1. Compiler: The language processor allows the computer to run and understand the program by
reading the complete source program in one time, which is written in a high-level
level language.

Features of Java - Javatpoint

The computer can then interpret this code because it is translated into machine language. While
working on the Harvard Mark I computer, Grace Hopper created the first compiler. In modern
times, to compilee the program, most of the high
high-level
level languages have toolkits or a compiler. Gcc
command for C and C++ and Eclipse for Java are two popular compilers. It takes a few seconds
or minutes while compiling the program based on how big the program is.

2. Assembler: An assembler converts programs written in assembly language into machine code.
It is also referred to assembler as assembler language by some users. The source program has
assembly language instructions, which is an input of the assembler. The assembler
assemble translates this
source code into a code that is understandable by the computer, called object code or machine
code.
3. Interpreter: An interpreter is a computer program that allows a computer to interpret or
understand what tasks to perform. The progra
programsms written with the help of using one of the many
high-level
level programming languages are directly executed by an interpreter without previously
converting them to an object code or machine code, which is done line by line or statement by
statement. When the interpreter is translating the source code, it displays an error message if
there is an error in the statement and terminates this statement from translating process. When
the interpreter removed errors on the first line, then it moves on to the next line.

Difference between Compiler and Interpreter

Compiler Interpreter

A compiler is a program that takes the complete The interpreter is different from the Compiler; it
program as a single unit and converts the entire takes a source program and translates it one by
source code into executable machine code for a one, and executes.
CPU.

The compiler is comparatively faster in order to As compared to the compiler, an interpreter is


the overall execution of the source code; however, slower in order to the overall execution of the
it takes a large amount of time to analyze to programming code, but it takes less time to
compile the complete programming code. evaluate the source code.

When the compiler completes scanning the whole With an interpreter, until the error is met, it
program, then it generates the error message. As continues converting the program; therefore, its
the error can be found in any statement in the debugging is easier.
program; therefore, debugging is comparatively
hard with a compiler.

When you want to run the program, a translator When you want to run the program, a translator
program is needed each time to convert the source program is not needed each time to convert the
code. source code.
It stores object code and is more beneficial for It does not hold object code, and it is more
commercial purposes. beneficial for learning purposes.

Examples: C, C++, Java, FORTRAN compiler, Examples: Python, Perl, LISP, APL, Prolog
PASCAL compiler. interpreter, etc.

Program Errors
Errors are the problems or the faults that occur in the program, which makes the behavior of the
program abnormal, and experienced developers can also make these faults. Programming errors
are also known as the bugs or faults, and the process of removing these bugs is known
as debugging.

These errors are detected either during the time of compilation or execution. Thus, the errors
must be removed from the program for the successful execution of the program.

There are mainly five types of errors exist in C programming:

o Syntax error
o Run-time error
o Linker error
o Logical error
o Semantic error

Syntax error

Syntax errors are also known as the compilation errors as they occurred at the compilation time,
or we can say that the syntax errors are thrown by the compilers. These errors are mainly
occurred due to the mistakes while typing or do not follow the syntax of the specified
programming language. These mistakes are generally made by beginners only because they are
new to the language. These errors can be easily debugged or corrected.

For example:

1. If we want to declare the variable of type integer,


2. int a; // this is the correct form
3. Int a; // this is an incorrect form.

Commonly occurred syntax errors are:


o If we miss the parenthesis (}) while writing the code.
o Displaying the value of a variable without its declaration.
o If we miss the semicolon (;) at the end of the statement.

Let's understand through an example.

1. #include <stdio.h>
2. int main()
3. {
4. a = 10;
5. printf("The value of a is : %d", a);
6. return 0;
7. }

Output

In the above output, we observe that the code throws the error that 'a' is undeclared. This error is
nothing but the syntax error only.

Run-time error

Sometimes the errors exist during the execution-time even after the successful compilation
known as run-time errors. When the program is running, and it is not able to perform the
operation is the main cause of the run-time error. The division by zero is the common example of
the run-time error. These errors are very difficult to find, as the compiler does not point to these
errors.

Let's understand through an example.

1. #include <stdio.h>
2. int main()
3. {
4. int a=2;
5. int b=2/0;
6. printf("The value of b is : %d", b);
7. return 0;
8. }

Output

In the above output, we observe that the code shows the run-time error, i.e., division by zero.

Linker error

Linker errors are mainly generated when the executable file of the program is not created. This
can be happened either due to the wrong function prototyping or usage of the wrong header file.
For example, the main.c file contains the sub() function whose declaration and definition is done
in some other file such as func.c. During the compilation, the compiler finds the sub() function
in func.c file, so it generates two object files, i.e., main.o and func.o. At the execution time, if
the definition of sub() function is not found in the func.o file, then the linker error will be
thrown. The most common linker error that occurs is that we use Main() instead of main().

Let's understand through a simple example.

1. #include <stdio.h>
2. int Main()
3. {
4. int a=78;
5. printf("The value of a is : %d", a);
6. return 0;
7. }
Output

Logical error

The logical error is an error that leads to an undesired output. These errors produce the incorrect
output, but they are error-free, known as logical errors. These types of mistakes are mainly done
by beginners. The occurrence of these errors mainly depends upon the logical thinking of the
developer. If the programmers sound logically good, then there will be fewer chances of these
errors.

Let's understand through an example.

1. #include <stdio.h>
2. int main()
3. {
4. int sum=0; // variable initialization
5. int k=1;
6. for(int i=1;i<=10;i++); // logical error, as we put the semicolon after loop
7. {
8. sum=sum+k;
9. k++;
10. }
11. printf("The value of sum is %d", sum);
12. return 0;
13. }

Output
In the above code, we are trying to print the sum of 10 digits, but we got the wrong output as we
put the semicolon (;) after the for loop, so the inner statements of the for loop will not execute.
This produces the wrong output.

Semantic error

Semantic errors are the errors that occurred when the statements are not understandable by the
compiler.

The following can be the cases for the semantic error:

o Use of a un-initialized variable.


int i;
i=i+2;
o Type compatibility
int b = "javatpoint";
o Errors in expressions
int a, b, c;
a+b = c;
o Array index out of bound
int a[10];
a[10] = 34;

Let's understand through an example.

1. #include <stdio.h>
2. int main()
3. {
4. int a,b,c;
5. a=2;
6. b=3;
7. c=1;
8. a+b=c; // semantic error
9. return 0;
10. }

In the above code, we use the statement a+b =c, which is incorrect as we cannot use the two
operands on the left-side.
Output

Features of Good Program

We know that each computer requires proper guidance set (programs) to play out the necessary
task. The processing of the task depends on the given instructions. So it is also important that the
provided instructions should be given in a proper way. Therefore, a program should be written in
such a way that it is more clear to understand and implement. So that it can provide us the with
the desired output.
These are the following characteristics of a good computer program -
Portability
A program should be supported by many different computers. The program should compile and
run smoothly on different platforms. Because of rapid development in the hardware and the
software, these days platform change is a common phenomenon. So, portability is measured by
how a software application can be transferred from one computer environment to another
without failure. A program is said to be more portable if it is easily adopted in different computer
systems. Subsequently, if a program is developed only for a particular platform, then the life
expectancy of the program is seriously influenced.

Maintainability
It is the process of fixing program errors and improving the program. If a program is easy to read
and understand, then its maintenance will be easier. It should also prevent unwanted works so
that the maintenance cost in the future will be low. It should also have quality to easily meet new
requirements. A maintainable software allows us to quickly and easily fix a bug, increase
usability and performance, add new features, make changes to support multiple platforms etc.

Efficient
Program is said to be more efficient if it takes least amount of memory and processing time and
is easily converted to machine language. The algorithm should be more effective. Every program
needs certain processing time and memory to process the instructions and data. The program
efficiency is also high if it has high speed during runtime execution of the program.

Reliable
The user's actual needs will change from time-to-time, so the program is said to be reliable if it
works smoothly in every version. It is measured as reliable if it gives same performance in all
simple to complex conditions.

Machine Independent
Program should be machine-independent. Program written on one system should be able to
execute on many different types of computers without any changes. It is not system specific and
provides more flexibility. An example of this would be Java.

Cost Effectiveness
Cost Effectiveness is the key to measure the program quality. Cost must be measured over the
life of the program and must include both cost and human cost of producing these programs.

Flexible
The program should be written in such a manner that it allows to add new features without
changing the existing module. The majority of the projects are developed for a specific period
and they require modifications from time to time. It should always be ready to meet new
requirements. Highly flexible software is always ready for a new world of possibilities.
Different Programming Paradigm

Paradigm can also be termed as method to solve some problem or do some task. Programming
paradigm is an approach to solve problem using some programming language or also we can
say it is a method to solve a problem using tools and techniques that are available to us
following some approach. There are lots for programming language that are known but all of
them need to follow some strategy when they are implemented and this methodology/strategy
is paradigms. Apart from varieties of programming language there are lots of paradigms to
fulfil each and every demand. They are discussed below:

1. Imperative programming paradigm:


It is one of the oldest programming paradigm. It features close relation to machine architecture.
It is based on Von Neumann architecture. It works by changing the program state through
assignment statements. It performs step by step task by changing state. The main focus is on
how to achieve the goal. The paradigm consist of several statements and after execution of all
the result is stored.
Advantage:
1. Very simple to implement
2. It contains loops, variables etc.
Disadvantage:
1. Complex problem cannot be solved
2. Less efficient and less productive
3. Parallel programming is not possible
Examples of Imperative programming paradigm:

// average of five number in C

int marks[5] = { 12, 32, 45, 13, 19 } ,int sum = 0;

float average = 0.0;

for (int i = 0; i < 5; i++) {

sum = sum + marks[i];

average = sum / 5;
Imperative programming is divided into three broad categories: Procedural, OOP and parallel
processing. These paradigms are as follows:
2. Object oriented programming
The program is written as a collection of classes and object which are meant for
communication. The smallest and basic entity is object and all kind of computation is
performed on the objects only. More emphasis is on data rather procedure. It can handle almost
all kind of real life problems which are today in scenario.
Advantages:
 Data security
 Inheritance
 Code reusability
 Flexible and abstraction is also present

3. Declarative programming paradigm:


It is divided as Logic, Functional, Database. In computer science the declarative
programming is a style of building programs that expresses logic of computation without
talking about its control flow. It often considers programs as theories of some logic.It may
simplify writing parallel programs. The focus is on what needs to be done rather how it should
be done basically emphasize on what code code is actually doing. It just declares the result we
want rather how it has be produced. This is the only difference between imperative (how to do)
and declarative (what to do) programming paradigms. Getting into deeper we would see logic,
functional and database.
sumoftwonumber(integer, integer)

sum(0, 0).
sum(n, r):-
n1=n-1,
sum(n1, r1),
r=r1+n

4. Functional programming paradigms

The functional programming paradigms has its roots in mathematics and it is language
independent. The key principal of this paradigms is the execution of series of mathematical
functions. The central model for the abstraction is the function which are meant for some
specific computation and not the data structure. Data are loosely coupled to functions.The
function hide their implementation. Function can be replaced with their values without
changing the meaning of the program. Some of the languages like perl, javascript mostly uses
this paradigm.

5. Multi-Paradigm programming
Multi-paradigm means C# for example borrows ideas from both object-oriented programming and
functional programming. To be both "multi-paradigm" and "object-oriented" means OOP is one of the
major paradigms, but not the only one.
A multi-paradigm programming language is a programming languages that supports more than
one programming paradigm. “The idea of a multiparadigm language is to provide a
framework in which programmers can work in a variety of styles, freely intermixing constructs
from different programming.

Software Development Model


1. Prototype Model
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.
Following is a stepwise approach explained to design a software prototype.

Basic Requirement Identification

This step involves understanding the very basics product requirements especially in terms of
user interface. The more intricate details of the internal design and external aspects like
performance and security can be ignored at this stage.

Developing the initial Prototype

The initial Prototype is developed in this stage, where the very basic requirements are
showcased and user interfaces are provided. These features may not exactly work in the same
manner internally in the actual software developed. While, the work arounds are used to give
the same look and feel to the customer in the prototype developed.

Review of the Prototype

The prototype developed is then presented to the customer and the other important stakeholders
in the project. The feedback is collected in an organized manner and used for further
enhancements in the product under development.

Revise and Enhance the Prototype

The feedback and the review comments are discussed during this stage and some negotiations
happen with the customer based on factors like – time and budget constraints and technical
feasibility of the actual implementation. The changes accepted are again incorporated in the new
Prototype developed and the cycle repeats until the customer expectations are met.
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.

Software Prototyping - Types

There are different types of software prototypes used in the industry. Following are the major
software prototyping types used widely −

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 - Application

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.
The advantages of the Prototyping Model are as follows −
 Increased user involvement in the product even before its implementation.
 Since a working model of the system is displayed, the users get a better understanding of
the system being developed.
 Reduces time and cost as the defects can be detected much earlier.
 Quicker user feedback is available leading to better solutions.
 Missing functionality can be identified easily.
 Confusing or difficult functions can be identified.
The Disadvantages of the Prototyping Model are as follows −
 Risk of insufficient requirement analysis owing to too much dependency on the
prototype.
 Users may get confused in the prototypes and actual systems.
 Practically, this methodology may increase the complexity of the system as scope of the
system may expand beyond original plans.
 Developers may try to reuse the existing prototypes to build the actual system, even
when it is not technically feasible.
 The effort invested in building prototypes may be too much if it is not monitored
properly.

2. Spiral Model
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.

Spiral Model - Design

The spiral model has four phases. A software project repeatedly passes through these phases in
iterations called Spirals.

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 - Pros and Cons

The advantages of the Spiral SDLC Model are as follows −


 Changing requirements can be accommodated.
 Allows extensive use of prototypes.
 Requirements can be captured more accurately.
 Users see the system early.
 Development can be divided into smaller parts and the risky parts can be developed
earlier which helps in better risk management.
The disadvantages of the Spiral SDLC Model are as follows −
 Management is more complex.
 End of the project may not be known early.
 Not suitable for small or low risk projects and could be expensive for small projects.
 Process is complex
 Spiral may go on indefinitely.
 Large number of intermediate stages requires excessive documentation.

3. Rapid Application Development (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?

Rapid application development is a software development methodology that uses minimal


planning in favor of rapid prototyping. A prototype is a working model that is functionally
equivalent to a component of the product.
In the RAD model, the functional modules are developed in parallel as prototypes and are
integrated to make the complete product for faster product delivery. Since there is no detailed
preplanning, it makes it easier to incorporate the changes within the development process.
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

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.
Testing and Turnover

The overall testing time is reduced in the RAD model as the prototypes are independently tested
during every iteration. However, the data flow and the interfaces between all the components
need to be thoroughly tested with complete test coverage. Since most of the programming
components have already been tested, it reduces the risk of any major issues.
The following illustration describes the RAD Model in detail.

RAD Model - Pros and Cons

The advantages of the RAD Model are as follows −


 Changing requirements can be accommodated.
 Progress can be measured.
 Iteration time can be short with use of powerful RAD tools.
 Productivity with fewer people in a short time.
 Reduced development time.
 Increases reusability of components.
 Quick initial reviews occur.
 Encourages customer feedback.
 Integration from very beginning solves a lot of integration issues.
The disadvantages of the RAD Model are as follows −
 Dependency on technically strong team members for identifying business requirements.
 Only system that can be modularized can be built using RAD.
 Requires highly skilled developers/designers.
 High dependency on modeling skills.
 Inapplicable to cheaper projects as cost of Modeling and automated code generation is
very high.
 Management complexity is more.
 Suitable for systems that are component based and scalable.
 Requires user involvement throughout the life cycle.
 Suitable for project requiring shorter development times.

4. 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.
The following illustration is a representation of the Iterative and Incremental model −

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.

Iterative Model - Pros and Cons

The advantage of this model is that there is a working model of the system at a very early stage
of development, which makes it easier to find functional or design flaws. Finding issues at an
early stage of development enables to take corrective measures in a limited budget.
The disadvantage with this SDLC model is that it is applicable only to large and bulky software
development projects. This is because it is hard to break a small software system into further
small serviceable increments/modules.
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 −
 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.
 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.
5. Waterfall Model

 Simplest and classic process model


 Linear and sequential method/ top to bottom
 Once a phase of development is completed, the development process proceeds to the next
phase and there is no turning back.
 Each steps should be completed and perfected before moving on to the next phase.
 Waterfall model phases: Requirement collection, Analysis, Design, Development,
Testing, Implementation and Maintenance.
Advantages
• Easiest approach to software development
• Each stage of development can be assigned with a deadline schedule.
• Phases do no overlap
Disadvantages
• Inflexible partitioning of the project into distinct stages makes it difficult to respond to
changing customer requirements.
• Therefore, this model is only appropriate when the requirements are well-understood and
changes will be fairly limited during the design process.
• It does not allow for much revision.
• The waterfall model is mostly used for large systems engineering projects where a system is
developed at several sites.

System/Program Development Life Cycle


An effective System Development Life Cycle (SDLC) should result in a high quality system
that meets customer expectations, reaches completion within time and cost evaluations, and
works effectively and efficiently in the current and planned Information Technology
infrastructure.
System Development Life Cycle (SDLC) is a conceptual model which includes policies and
procedures for developing or altering systems throughout their life cycles. SDLC is used by
analysts to develop an information system. SDLC includes the following activities −
 requirements
 design
 implementation
 testing
 deployment
 operations
 maintenance
Phases of SDLC

Systems Development Life Cycle is a systematic approach which explicitly breaks down the
work into phases that are required to implement either new or modified Information System.

Feasibility Study or Planning

 Define the problem and scope of existing system.


 Overview the new system and determine its objectives.
 Confirm project feasibility and produce the project Schedule.
 During this phase, threats, constraints, integration and security of system are also
considered.
 A feasibility report for the entire project is created at the end of this phase.
Analysis and Specification
 Gather, analyze, and validate the information.
 Define the requirements and prototypes for new system.
 Evaluate the alternatives and prioritize the requirements.
 Examine the information needs of end-user and enhances the system goal.
 A Software Requirement Specification (SRS) document, which specifies the software,
hardware, functional, and network requirements of the system is prepared at the end of
this phase.
System Design

 Includes the design of application, network, databases, user interfaces, and system
interfaces.
 Transform the SRS document into logical structure, which contains detailed and
complete set of specifications that can be implemented in a programming language.
 Create a contingency, training, maintenance, and operation plan.
 Review the proposed design. Ensure that the final design must meet the requirements
stated in SRS document.
 Finally, prepare a design document which will be used during next phases.
Implementation

 Implement the design into source code through coding.


 Combine all the modules together into training environment that detects errors and
defects.
 A test report which contains errors is prepared through test plan that includes test related
tasks such as test case generation, testing criteria, and resource allocation for testing.
 Integrate the information system into its environment and install the new system.

Maintenance/Support

 Include all the activities such as phone support or physical on-site support for users that
is required once the system is installing.
 Implement the changes that software might undergo over a period of time, or implement
any new requirements after the software is deployed at the customer location.
 It also includes handling the residual errors and resolve any issues that may exist in the
system even after the testing phase.
 Maintenance and support may be needed for a longer time for large systems and for a
short time for smaller systems.
System Design Tools
Software analysis and design includes all activities, which help the transformation of
requirement specification into implementation. Requirement specifications specify all
functional and non-functional
functional expectations from the software. These requirement specifications
come in the shape of human readable and understandable dodocuments,
cuments, to which a computer has
nothing to do.
Software analysis and design is the intermediate stage, which helps human-readable
human
requirements to be transformed into actual code.

Data Flow Diagram


Data flow diagram is graphical representation of flow of ddata
ata in an information system. It is
capable of depicting incoming data flow, outgoing data flow and stored data. The DFD does not
mention anything about how data flows through the system.
There is a prominent difference between DFD and Flowchart. The flowc
flowchart
hart depicts flow of
control in program modules. DFDs depict flow of data in the system at various levels. DFD
does not contain any control or branch elements.

Types of DFD
Data Flow Diagrams are either Logical or Physical.

 Logical DFD - This type of DFD concentrates on the system process and flow of data in
the system. For example in a Banking software system, how data is moved between
different entities.
 Physical DFD - This type of DFD shows how the data flow is actually implemented in i
the system. It is more specific and close to the implementation.

DFD Components
DFD can represent Source, destination, storage and flow of data using the following set of
components -

 Entities - Entities are source and destination of information data. Entities are represented
by a rectangles with their respective names.
 Process - Activities and action taken on the data are represented by Circle or Round-Round
edged rectangles.
 Data Storage - There aree two variants of data storage - it can either be represented as a
rectangle with absence of both smaller sides or as an open
open-sided
sided rectangle with only one
side missing.
 Data Flow - Movement of data is shown by pointed arrows. Data movement is shown
from the
he base of arrow as its source towards head of the arrow as destination.

Levels of DFD

 Level 0 - Highest abstraction level DFD is known as Level 0 DFD, which depicts the
entire information system as one diagram concealing all the underlying details. Level 0
DFDs are also known as context level DFDs.

 Level 1 - The Level 0 DFD is broken down into more specific, Level 1 DFD. Level 1
DFD depicts basic modules in the system and flow of data among various modules. Level
1 DFD also mentions basic processes and sources of information.
 Level 2 - At this level, DFD shows how data flows inside the modules mentioned in
Level 1.
Higher level DFDs can be transformed into more specific lower level DFDs with deeper
level of understanding unless the desired level of specification is achieved.

Decision Tables
A Decision table represents conditions and the respective actions to be taken to address them, in
a structured tabular format.
It is a powerful tool to debug and prevent errors. It helps group similar information into a single
table and then by combining tables it delivers easy and convenient decision-making.

Creating Decision Table


To create the decision table, the developer must follow basic four steps:

 Identify all possible conditions to be addressed


 Determine actions for all identified conditions
 Create Maximum possible rules
 Define action for each rule
Decision Tables should be verified by end-users and can lately be simplified by eliminating
duplicate rules and actions.

Example
Let us take a simple example of day-to-day problem with our Internet connectivity. We begin
by identifying all problems that can arise while starting the internet and their respective possible
solutions.
We list all possible problems under column conditions and the prospective actions under
column Actions.

Conditions/Actions Rules

Shows Connected N N N N Y Y Y Y
Conditions Ping is Working N N Y Y N N Y Y
Opens Website Y N Y N Y N Y N

Check network cable X

Check internet router X X X X


Actions Restart Web Browser X
Contact Service provider X X X X X X
Do no action
Table : Decision Table – In-house Internet Troubleshooting
Entity-Relationship Diagram
Entity-Relationship
Relationship model is a type of database model based on the notion of real world entities
and relationship among them. We can map real world scenario onto ER database model. ER
Model creates a set of entities with their attributes, a set of constraints and relation among them.
ER Model is best used for the conceptual design of database. ER Mode
Modell can be represented as
follows :

 Entity - An entity in ER Model is a real world being, which has some properties
called attributes.. Every attribute is defined by its corresponding set of values,
called domain.
For example, Consider a school database. He Here,
re, a student is an entity. Student has
various attributes like name, id, age and class etc.
 Relationship - The logical association among entities is called relationship.
Relationships are mapped with entities in various ways. Mapping cardinalities define the
number of associations between two entities.
Mapping cardinalities:

o one to one
o one to many
o many to one
o many to many

Flowchart
Flowchart is a graphical representation of an algorithm. Programmers often use it as a
program-planning
planning tool to solve a problem. It makes use of symbols which are connected
among them to indicate the flow of information and processing.
The process of drawing a flowchart for an algorithm is known as “flowcharting”.

Basic Symbols used in Flowchart Designs


1. Terminal: The ovall symbol indicates Start, Stop and Halt in a program’s logic flow. A
pause/halt is generally used in program logic under some error conditions.
nditions. Terminal is the
first and last symbols in the flowchart.
 Input/Output: A parallelogram denotes any function of input/output type. Program
instructions that take input from input devices and display output on output devices are
indicated with parallelogram in a flowchart.

 Processing: A box represents arithmetic instructions. All arithmetic processes such as


adding, subtracting, multiplication and division are indicated by action or process symbol.

 Decision Diamond symbol represents a decision point. Decision based operations such as
yes/no question or true/false are indicated by diamond in flowchart.

 Connectors: Whenever flowchart becomes complex or it spreads over more than one page,
it is useful to use connectors to avoid any confusions. It is represented by a circle.

 Flow lines: Flow lines indicate the exact sequence in which instructions are executed.
Arrows represent the direction of flow of control and relationship among different symbols
of flowchart.

Advantages of Flowchart:
 Flowcharts are better way of communicating the logic of system.
 Flowcharts act as a guide for blueprint during program designed.
 Flowcharts helps in debugging process.
 With the help of flowcharts programs can be easily analyzed.
 It provides better documentation.
 Flowcharts serve as a good proper documentation.
Disadvantages of Flowchart:
 It is difficult to draw flowchart for large and complex programs.
 In this their is no standard to determine the amount of detail.
 Difficult to reproduce the flowcharts.
 It is very difficult to modify the Flowchart.
Example : Draw a flowchart to input two numbers from user and display the largest of
two numbers

Algorithm
Computer programming terms, an algorithm is a set of well-defined instructions to solve a
particular problem. It takes a set of input and produces a desired output.

Qualities of Good Algorithms


Input and output should be defined precisely.
Each step in the algorithm should be clear and unambiguous.
Algorithms should be most effective among many different ways to solve a problem.
An algorithm shouldn't include computer code. Instead, the algorithm should be written in such
a way that it can be used in different programming languages.

 Algorithm 1: Add two numbers entered by the user

 Step 1: Start
 Step 2: Declare variables num1, num2 and sum.
 Step 3: Read values num1 and num2.
 Step 4: Add num1 and num2 and assign the result to sum.
 sum←num1+num2
 Step 5: Display sum
 Step 6: Stop
 Algorithm 2: Find the largest number among three numbers

 Step 1: Start
 Step 2: Declare variables a, b and c.
 Step 3: Read variables a, b and c.
 Step 4: If a > b
 If a > c
 Display a is the largest number.
 Else
 Display c is the largest number.
 Else
 If b > c
 Display b is the largest number.
 Else
 Display c is the greatest number.
 Step 5: Stop

Decision Tree
A decision tree is a diagram representation of possible solutions to a decision. It shows different
outcomes from a set of decisions. The diagram is a widely used decision-making tool for
analysis and planning.
The diagram starts with a box (or root), which branches off into several solutions. That’s way, it
is called decision tree.
Decision trees are helpful for a variety of reasons. Not only they are easy-to-understand diagrams
that support you ‘see’ your thoughts, but also because they provide a framework for estimating
all possible alternatives.

The Structure of Decision Tree


Let’s explain the decision tree structure with a simple example.
Each decision tree has 3 key parts:
 Root node
 Leaf nodes
 Branches.
Pseudo-Code
Pseudo code is written more close to programming language. It may be considered as
augmented programming language, full of comments and descriptions.
Pseudo code avoids variable declaration but they are written using some actual programming
language’s constructs, like C, Fortran, Pascal etc.
Pseudo code contains more programming details than Structured English. It provides a method
to perform the task, as if a computer is executing the code.

Example: Program to print Fibonacci up to n numbers.


void function Fibonacci
Get value of n;
Set value of a to 1;
Set value of b to 1;
Initialize i to 0
for (i=0; i< n; i++)
{
if a greater than b
{
Increase b by a;
Print b;
}
else if b greater than a
{
increase a by b;
print a;
}
}

You might also like