Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
0% found this document useful (0 votes)
61 views

Chapter 3 Programming Techniques (PLT)

The document discusses various programming techniques used by programmers. It describes top-down and bottom-up design approaches, where top-down begins with overall system design and breaks it into subtasks, while bottom-up builds the system from basic components. Modular programming is explained as dividing large complex programs into smaller logically self-contained modules. Object-oriented programming follows a bottom-up approach using modular design principles. The advantages and disadvantages of top-down and bottom-up approaches are also outlined.

Uploaded by

itsamazing496
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
61 views

Chapter 3 Programming Techniques (PLT)

The document discusses various programming techniques used by programmers. It describes top-down and bottom-up design approaches, where top-down begins with overall system design and breaks it into subtasks, while bottom-up builds the system from basic components. Modular programming is explained as dividing large complex programs into smaller logically self-contained modules. Object-oriented programming follows a bottom-up approach using modular design principles. The advantages and disadvantages of top-down and bottom-up approaches are also outlined.

Uploaded by

itsamazing496
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 14

PROGRAMMING LOGIC AND TECHNIQUES

PROGRAMMING TECHNIQUES
1. INTRODUCTION:
Program is a series of instructions and procedures which made for perform the specific task. The programmer can
use any logic and method for develop the program. Programming technique is a logic, procedure and methodology of
the programming which used by the programmer to design the program easily and separately. The Programmer can
develop his/her program with ability to carry out specific sequence of calculations for a short period of time and
ability to make logical decisions and repetition of given set of instructions automatically without any bug or error.
These types of logical decisions or branching capabilities such as iteration control, selection control or decision
control or condition control are the programming techniques which coded by the programmer. The programming
technique also helps for the decision making. The programming techniques allow the programmer to divide the
programming tasks into sub tasks and use previously written block also. Most of the programming algorithms relay
the technique uses of iteration and condition branching. There are various techniques used by the programmer or
developer to make effective, errorless and versatile. Some of important techniques are described below:
1.Top down and bottom up design
2. Modular Programming
3. Structural Programming
4. Object oriented programming

1. Top down and bottom up design:


In the Top Down technique the design of the program system is started at the system level. This method is based
on the fact that large problems become more manageable if they can be divided into a number of smaller and similar
tasks which can be tackled separately. The programmer first develop the over all supervisor program which is used
to outline and control subprograms and sub tasks. The whole system work is divided into a number of subtasks. The
main controller program or supervisor program is then tested to see that its logic is correct or not correct. If the
subprogram runs properly then it is tested with the main program. If the subprogram and the main program run
properly then next subprogram is written and checked and so on. Sometimes it is also known as step wise design
also. This approach is essentially the breaking down of a system to gain insight into its compositional sub systems.

First, the main program would be written and tested with three stubs Sub program A, Sub program B, Sub program
C. Next, subprogram A would be written and tested with two stubs Sub program D and Sub program E. Then it would
be tested with main program. Sub program B and Sub program C and their stubs would be developing in the same
way.
Advantages of Top-down approach:
 It starts with the top level module and progresses downward to the lowest level module.
 It allows a programmer to remain "on top of" a problem and view the developing solution in context. The
solution always proceeds from the highest levels down.
 Separating the low –level work from high level concept leads to a modular design. Modular design means
development can be self-contained.
 Projects become quite optimized as each developer applies his own knowledge and experience to individual
modules.
 It is easy to visualize, provides sense of completeness and easy to access the progress at any stage.
 Increased intellectual manageability and comprehension. And reduced debugging time.

Disadvantages of Top-down approach:


 Main structure of the project is designed but the task is not solved.
 Data are not hidden. So it can be processed by any function.
 No reference can be taken of pre-defined processed in top-down approach.
2. Bottom up design:
Prepared by: N.P.BHUSAL 1 Email ID: smcnpbhusl@gmail.com
PROGRAMMING LOGIC AND TECHNIQUES
The Bottom up Design is the process of piecing together of system to give rise to grander or luxurious system. In
this approach the individual base elements of the system are first specified. These elements are then linked together
to from larger sub systems. Programming Engineer part of the mechanical engineering is a good example of bottom
up design because the parts are first created and then assembled without regard to how the parts will work in the
assembly. This technique tells to write small component of system that does the basic actions which are required the
complete programs work and assemble them with main program. In this technique the individual base elements of
the program are first specified and then linked together with each other and with the main program.
In a program repeated lines or multiple lines of the code also can be used. At the programming level there can be
used sub routines to construct a program. There also can save repeating the same line of the code by reusing it. After
all the basic language commands are used many times without causing a problem. In this sense a simple approach to
reusable software is a bottom up technique designed to extend the range of commands in the language. This type of
programming approach is commonly applied in reverse engineering while for a brand new project.

Advantages of Bottom-Up design:


 If the system is to build from existing system this approach is more suitable as it starts from some existing
modules.
 If some updates is to be done to an existing system bottom up approach is suitable.
 In OOP method data are hidden and encapsulated with necessary function within objects.
 Bottom-up design is used to reduce the size and complexity of their programs.
 Bottom-up design promotes code re-use.
 Bottom-up design makes programs easier to read.

Disadvantages of Bottom-Up design:


 The structure of the program is not cleared.
 The list of sub task is not prepared before making program modules. So, some modules may be missed in hurry
or less care.
 It has not focus on specific requirements and thus its result may not feet a given need.
 High quality bottom-up approach solutions are hard to construct.
 The progress is cannot be verified easily at the mid stage.
Differences between Top -down and Bottom-up approach:
SR TOP DOWN APPROACH BOTTOM UP APPROACH
1. Procedural programming follows this approach. Object oriented programming follows this approach.
2. Top-down approach also called as step-wise Bottom-up approach is more suitable for a project or
approach. system which is going to start from some existing
modules.
3. Top-down approach starts with high level system Bottom-up approach starts with low level system or
or design then it goes to low level system or design design or development. Then it looks for high level
or development. system or design.
4. Top-down approach first focus on abstract of Bottom-up approach initially focuses on detail design
overall system or project. At last it focuses on or development. At last it concentrates on abstract of
detail design or development. over all system or project.
5. In this approach first programmer has to write In this approach first programmer has to write code
code for main function. In main function they will for modules. Then they look for integration of these
call other sub function. At last they will write code modules.
for each sub function.
6. C programmer follows Top-down approach. C++, Java programmer follows Bottom-up approach.

Prepared by: N.P.BHUSAL 2 Email ID: smcnpbhusl@gmail.com


PROGRAMMING LOGIC AND TECHNIQUES
2. Modular Programming Design:
When a program becomes very larger and complex, it becomes a very difficult task for the programmer or developer
to design, test and debug such a program. So, a long and large program can be divided in to smaller program or
discrete part of programs called modules. The division of large programs into logically self contained part and
discrete part which called modules are called modular programming. The system considered modular it consists of
discrete components such that each component supports a well-defined abstraction, and if a change to one
component has minimal impact on other components. The main purpose of modular programming is to break a
complex task into smaller and similar sub tasks which facilitate the features of writing programs correct and in a
reasonable time. The modules are written as a program within a program. The main module defines the order in
which of the modules or subroutines will be used. This is an important technique for programming which is mostly
used for designing the large and complex programs. This technique is also can be used for shorter programs of
microprocessor. The division technique is used in modular programming. So, it is particularly useful in
microprocessor programming. Each module can be kept in library of program and it can be used for later work.

Here, a large program divided into four sub modules. Each module encompasses a specific function within the
program. The function of each module can be different such as input, locate, update, print etc. This technique allows
several programmers to code simultaneously and decrease the debugging time. Function of each module can be
logically separated. Such functions can be initialization part, input, processing, output, error handling, closing
procedure etc. parts.
Advantages of modular design:
 Some modules will be standard procedures used again and again in different programs or parts of the same
program.
 Since module is small, it is simpler to understand, code, easier to test and debug, especially and documented.
 Program maintenance becomes easier because the affected modules can be quickly identified and changed.
 In a very large project, several programmers may be working on a single program. Using a modular approach,
the tasks can be distributed among programmers.
 More experienced programmers can be given the more complex modules to write, and the junior programmers
can work on the simpler modules.
 Modules can be tested independently, thereby shortening the time taken to get the whole program working.
 If a programmer leaves part way through a project, it is easier for someone else to take over a set of self
contained modules.
 A large project becomes easier to monitor and control.

Disadvantages of Modular design:


 Separate modules may repeat certain functions, the modular programming often need extra time and memory.
 The combining of the modules may be a problem particularly when different persons design and develop
different modules.
 The documentation needs special attention because a module may affect the other part of the program.

3. Structural Programming Design:


The long and complex program may be well understood by the programmer who developed but not understood by
the person who had maintained or used the program. To overcome this difficulty a technique developed to write a
program which called Structured programming technique. This method is a method of programming where the
programmer divides his source code of program in to logically structured chunks of code. Structuring a program
helps to break down a program into understandable chunks. Structured design cannot reduce the overall complexity
of a system but breaking it down into smaller chunks, the program becomes easier. The basic idea behind this
technique is that any part of the program can be represented by elements which contains any structure from three
basic structures or building blocks which has single entry and single exit. These three basic coding structures allow a
program to be read from top to bottom. Making these logics of the program that program will be more visible and
understandable for checking and maintenance.

Prepared by: N.P.BHUSAL 3 Email ID: smcnpbhusl@gmail.com


PROGRAMMING LOGIC AND TECHNIQUES
Importance of Structured Programming
Structured programming is important for the following reasons:
 It is much easier for students to debug structured programs and for structures to grade them.
 Students who learn top-down modular design retain what they have learned over a much longer period of time.
 Students who go on from structured BASIC to PASCAL and/or structured COBOL are better prepared for these
languages.
Disadvantages of Structured programming:
 Chance of Data corruption and lack of information hiding.
 Redundancy of the instructions and codes. Because the code is not split up into reusable sections.
 It may take longer to develop programs using structured language.

There are three basic logical structures which can define a programming as structure programming technique using
program.
Three basic logical structures (Types of logics):
1. Simple Sequential Structure or Linear Structure
2. Conditional or Selection or Decisional Structure
3. Looping Structure or Iterative Structure or Repetitive Structure

1. Simple Sequence Structure: It is a linear structure in which instructions or statements are executed
consecutively in a sequence. In this method the program prepared according to straight forward programming in
a sequential manner. This type of programming does not involve any decision making.

2. Conditional Structure: In this structure a condition is tested. The condition is followed by two alternative blocks
or program control paths. The selection of the path depends on the result of the test. If the condition is satisfied or
the truth, then first particular program is executed otherwise another or false particular program is executed.

2. Looping Structure: In this technique every looping logics uses the condition factors for the finite time period.
This technique indicates that the part of program or statement can occur repeatedly. In this structure a condition
also is checked and executes the program till the satisfaction of the condition. If given condition is true then the given
program is executed for certain number of tome until the condition is satisfied. If the condition is false then the given
program 1 is not executed.

Prepared by: N.P.BHUSAL 4 Email ID: smcnpbhusl@gmail.com


PROGRAMMING LOGIC AND TECHNIQUES

In a loop and operation or a setoff operations are repeated as long as (while) condition is satisfied. The basic form of
repetition is termed WHILE in the literature of structured programming.
Advantages of Structured programming:
 The problem at hand is analysed or broken down into major components, each of which is again broken down if
necessary.
 Each module has one entry point and one exit point.
 Two-way decision statements are based on IF-THEN, IF-THEN-ELSE, and nested IF statements.
 Loops are based on the consistent use of WHILE-WEND and FOR-NEXT.

Difference between Iteration and Recursion


SR ITERATION RECURSION
1. It is the process of executing a statement or a set Recursion is the technique of defining anything in
of statements repeatedly, until some specific terms of itself.
condition is satisfied.
2. Any recursive problem can be solved iteratively. Not all problems have recursive solution.
3. Loop is used to do repeated task. A function is called from the definition of the same
function to do repeated task.
4. In iteration, a function does not call to itself. In recursion, a function calls to itself until some
condition will be satisfied.
5. It is not necessary to define a problem in term of Problems could be written or defined in term of its
its previous result to solve using iteration. previous result to solve a problem using recursion.

2. COMMUNICATION BETWEEN MODULES:


Modules are the smaller individual programs or stubs of the program. To complete specific task about the program
development the programmer divides his/her program into smaller modules. These modules perform their own
functional work simultaneously or individually according to the design. To continuous the programming process
every modules have to communicate with each other i.e. the programmer designs the modules with the connection
or relation with the each other. In other word one module calls another module to completer the specific task and
while calling a module data is passed to the procedure. About the inter-module process there are two types of
information operation passed between modules which listed below:
1. Data
2. Control

The data pass from the main module or root module or boss module to the lower level module ,there need to call or
invoke the lower level module. Generally, the first module is main module and it said to call or invoke the lower level
module. In the Root module data or parameter or address can be passed to the lower level module.

Control items are used to direct program control and show the activities or errors of the module or conditions of the
modules and sub modules. The root module passes the control down at the lower level modules. The control is
always returned to the invoking module and as a finished module should always terminate at the root.

Prepared by: N.P.BHUSAL 5 Email ID: smcnpbhusl@gmail.com


PROGRAMMING LOGIC AND TECHNIQUES

Here, in the diagram GET CUSTOMER DETAIL named module invokes the module FIND CUSTOMER DEATIL named
module by passing Customer A/C number. The flag Account No. OK is sent to the calling module to confirm that the
requested account number does have a valid account name. Here control couple is shown by black filled in circle on
the tail of arrow.

The data pass to the Module has two ways:


1. Pass by value: In the pass by value, the data is passed, not its address .So the duplicate copy of original data is
processed by the module which called. The original data remain preserved or unchanged during program execution.
2. Pass by reference (address): In pass by reference, the address of the data is passed to the module. So, the
original data is processed and may change during program execution.

3. MODULAR DESIGN: COHESION AND COUPLING:


Modularity is a desirable property in a system. A software or program can not be made or called modular by simply
dividing it into set of modules. Some criteria or activities must be used to select modules so, that the module
supports well defined abstractions and are solvable and modifiable separately. Cohesion and Coupling are the two
such modularization criteria. These two cohesion and Coupling are sometimes used individually and sometimes used
together also for the design the module. Cohesion and coupling of the module are both related for the internal
module activities. Usually cohesion is each module in the system, lower will be the coupling between the modules.

Cohesion:
Cohesion is concern with examining the internal activities of a single module. It is a measure of functional strength of
a module. Generally one module should perform only one task. It is the degree to which module is concerned with a
single task. A module having high cohesion and low coupling is said to be functionally independent of other modules.
By the term functional independence, we mean that a cohesive module performs a single task or function. It refers to
how clearly define a particular module or procedure. A module with high cohesion performs one or few things
exceedingly well. It is the concept which tries to capture relation with intra-module. Cohesion of a module represents
how tightly bounded the internal elements of the module one to another. It is a module activity that perform all the
operation here, suppose inputs or outputs .In such situation if we want to input or output a particular record , we
have to convey this to the module. Within the cohesion every module try to perform many tasks-validate input,
process data, output results individually them. There are several levels (Types) of cohesion such as functional level,
sequential level, temporal level, procedural level, logical level etc. which defined in brief.

 Functional Cohesion: A module is called functionally cohesion when it consists of data items that all contribute
to the execution of one task. These types of modules are overcomes single-minded.
 Sequential Cohesion: A module is called sequentially cohesion when it consist the elements with the sequence
of actions. In this activity within the module are correlated to earn the specified task of the module.
 Communicational Cohesion: This is the module that performs a number of activities on the same input or
output data. For example: entered data Customer Ac/No. may be used within one module to find the Customer
Name, Address, Contact No., Balance etc.
 Procedural Cohesion: A module is called procedurally cohesion whose internal activities seem to bear little
relationship to each other. In this type of module, control passes between each activities to another and may be
organized in sequence order.
Prepared by: N.P.BHUSAL 6 Email ID: smcnpbhusl@gmail.com
PROGRAMMING LOGIC AND TECHNIQUES
 Temporal Cohesion: A module is called procedurally cohesion where every activities tent to occur at the same
time. In this model activities are more closely related to those in other modules also.
 Logical Cohesion: A module is called procedurally cohesion where the selection of activities within a module is
directed form the outside. The module contains activities of general kind, which is selected through the common
interface.
 Coincidental Cohesive: A module is called procedurally cohesion where the activities have no temporal, no
procedural or logical connection. The modules have probably been created by cutting up longer program into a
modularized design.

Coupling:
Coupling is a link and connection between two or more modules. Coupling is an activity which consists of
interconnections between modules and measure interdependence among the modules. Highly coupled modules are
joined by strong interconnection relations while loosely coupled modules have weak interconnection relations
whenever individual modules have no any relation of connectivity. Coupling increases with the complexity of the
interface between modules because if any procedure has parameters and there need to call the items then there
need the communication with other module so, there, coupling is considered highest if the data is hybrid i.e. some
data items and some data control item are passed between modules. Coupling is reduced when the relationships
among the elements in different modules are minimized. There are several forms of coupling which are described in
brief.

 Data Coupling: A module is called data coupling where performs the activity of exchange of data items between
the modules. This is necessary for module control and communication. Data coupling is when modules share
data through, for example, parameters. Each datum is an elementary piece, and these are the only data shared
(e.g., passing an integer to a function that computes a square root).
 Stamp Coupling: A module is called Stamp coupling when a whole data structure is passed to a module and in
that structure there are data items which are irrelevant to the calling module. This activity introduces
dependencies between modules which are unrelated but structure should be passed. Two modules are stamped
coupled, if they communicate using a composite data item such as a record in PASCAL or a structure in C.
 Common Coupling: A module is called Common coupling if any two modules refers to the same common data
area. These common data area are defined within the context of target programming language. Common
coupling can lead to problems in error rippling, maintenance and inflexibility.
 Content Coupling: A module is called Content coupling if one module refers to the internal workings of the
others. This activity in modules produces systems which are virtually unmentionable.
 Control coupling: It is a type of coupling in which one module communicates information to another module for
the explicit purpose of influencing the execution of the latter. It is the manner or degree by which one software
component influences the execution of another software component. It is the process in which one module is
controlling the flow of another, by passing it information on what to do (e.g., passing a what-to-do flag).

4. PROGRAM (SOFTWARE) DEVELOPMENT MODELS (METHODS):


Program development model or method is framework that describes the activities performed at each stage of a
software development project. It is also called software Life cycle model. A “Software Life-Cycle Model” specifies
when the processes are conducted and how they feed into each other. A software lifecycle model is a standardised
format for planning, organising and running a new development project. There are a number of models, which can
be used to develop software, like waterfall model, spiral life cycle model, iterative and incremental development
model, agile development, etc. In each of the models, the steps are broadly divided into three stages, namely the
planning stage, implementation, testing and documenting stage and at last the deployment and maintenance stage.
Whichever model is choosing for software development, the software in the end has to go through these stages. The
order in which the software goes through the model may vary. Each of the models, which can be used in the software
development life cycle, has its own pros and cons. Therefore, depending on the team, the project, availability of the
resources, urgency level, etc. the model to be adopted is chosen by the development team. There is also a possibility
of number of models been combined together that depending on the needs of the project.

Program development models are the particular hypothetical and situational description of a complex entity or
process of the program. The evolution of software or program development represent the cycle of activities involved
in the development to use and the maintenance of the software or program system. The program development life
cycle depicts the significant phases or activities of a program project form conception until the product is complete.
It specifies the relationship between program or project phases, including transitions criteria, feedback mechanisms,
Prepared by: N.P.BHUSAL 7 Email ID: smcnpbhusl@gmail.com
PROGRAMMING LOGIC AND TECHNIQUES
reviews etc. Typically a program development life cycle model addresses the every phases of the program or
software i.e. requirement phase , design phase, coding phase, implement phase, debugging and testing phase ,
operational and maintenance phase and so on. It is a matter of picking the right tool for the job. A developer or
programmer can follow any suitable model to complete his /her program. This is also called a development process
layout. A development process is a set of activities which are performed according to specified order to get desired
output. It is an abstract representation of a development process.

Mostly using models (methods) for Program Development:


1. Waterfall or Traditional Model
2. Prototype Model
3. Spiral Model
4. Iterative Model
5. V-Model
6. RAD Model
7. Big Bang Model
8. Evolutionary Model

The Waterfall or Traditional Model:


Since the time it was first published by Winston W. Royce in 1970, the waterfall model has been used widely in the
field of software development. The waterfall model is the simplest program development model where the phases of
development are organized in linear order. It is the classic lifecycle model which is widely known, understoodand
commonly used to make a simple software. It is sometimes called as Single Version Model. The sequence of activities
that waterfall model contains feasibility analysis, requirement analysis, project planning, system design, detailed
design, coding and unit testing, system integration and implementation. At the end of the each phase, validation and
some certification of the intermediate work program is made to ensure that the output phase is consist with its
input, and output of a phase consists of overall requirements of the system. The waterfall model is most widely used
process model. It is well suited for routine type of programming or project development where all the requirements
are well understood. In the waterfall model after each phase is finished, it proceeds to the next one. Reviews may
occur before moving to the next phase which allows for the possibility of changes.

When to use waterfall model:


 Requirements are very well known
 System definition is stable
 Technology is understood
 New version of an existing system

Advantages of waterfall model:


 Easy to understand and implement.
 Identifies deliverables and milestones
 All the requirements are well understood by the programmer and analyst.
 Document driven for the program development.
 It is sequential and phase based program.
 It can be used for routine types of programs or softwares.
Disadvantages of waterfall model:
 Takes very long period to completion of program/project.
 It does not check the feedback of the user at a time of development.
 This model is successive for only routine type of projects.
 It does not allow visibility in to the product until the complition of product.
 It is not suitable for new project because of uncertainty in the specification.
 Difficult to integrate risk management
 Difficult and expensive to make changes to documents.

Prepared by: N.P.BHUSAL 8 Email ID: smcnpbhusl@gmail.com


PROGRAMMING LOGIC AND TECHNIQUES
The Prototype Model:
Prototyping is the process of quickly putting together a working model (a prototype) in order to test various
aspects of a design, illustrate ideas or features and gather early user feedback. IEEE defines prototyping as “ A type of
development in which emphasis is placed on developing prototypes early in the development process to permit
early feedback and analysis in support of the development process.” There are several types of prototyping: Throw-
away prototyping, Evolutionary prototyping, Low Fidelity prototyping, High Fidelity prototyping.

The Prototype model is the model that serves as a mechanism for identifying the program requirements. Sometimes
the programmer does not sure about the efficiency of handle all the situations. These many other different situations
are common for a large and complex system for which there is no manual system exists. To develop a program or
software product for such problems prototyping model is used. This is the model begins with requirement gathering.
The developer defines over all objectives and contents and also identifies the area for the system. This model
provides feedback about what is correct, area to be modified, features to be added then the final requirements are
refined and the program developed. It is well suited where the requirements are hard to determine. This type of
mostly needed for develop new programming system or new project system where it is not clear that the constraints
can be met. Instead of concentrating core documentation, more effort is placed in the actual program or software
development. It saves the time in creating a program or software than traditional model. This type of model used
technique to perform the required changes to a program based on the feedback of client or user. This model using
softwares or programs maintained according to the clients or customers or users satisfaction. It is an iterative, trial-
and-error process that takes place between the developers and the users. Therefore, prototyping is an excellent
technique for reducing risks associated with a program or project. Experience of developing prototype reduces the
cost of later phases of the product development.

Advantages of Prototype model:


o A portion product is build in the initial stage therefore customer get a chance to see the product early in the life
cycle and thus gives necessary feedback. (A preliminary design is created for the new system.)
o Requirements become clearer resulting in to an accurate product.
o Instead of concentrating on documentation, more effort is placed in creating the actual software. This way, the
actual software could be released in advance.
o The work will even be faster and efficient if developers will collaborate more regarding the status of a specific
function and develop the necessary adjustments in time for the integration.
o As user is involved from the starting of the project, he/she tends to be more securing comfortable and satisfied.
Disadvantages of Prototype model:
• Developers in a hurry way built prototypes and end up with sub –optional solutions.
• If end user is not satisfied with initial prototype he/she may loose interest in the project.
• Poor documentation.
• After seeing an earlier prototype the user may demand the actual system to be delivery soon.
• If not managed properly the project, the interactive process a prototype demonstration and refinement and
continue for long duration.
Best uses of prototyping
 Most beneficial for systems that will have many interactions with end users
 The greater the interaction between the computer and the user, the greater the benefit of building a
quick system for the user to play with
 Especially good for designing good human-computer interfaces

SN. Waterfall model Prototype model


1. User can only preview the system only after the Users can preview the system from the quick design
final version of the software is developed. and the prototype developed early at the of the process.
2. Users are not directly involved for the Users are directly involved for the development of
development of program. program.
Prepared by: N.P.BHUSAL 9 Email ID: smcnpbhusl@gmail.com
PROGRAMMING LOGIC AND TECHNIQUES
3. The complexity of an error is high because each The complexity of an error is low because the prototype
phase is sequential of the other. enables the developer to detect any deficiency early at
the process.
4. User feedback is not necessary in development. User feedback is necessary in development.
5. It is document driven model. It is not document driven model.

The Spiral Model:


The Spiral model published in 1988 at the first time by Barry Boehm through his (1986) article "A Spiral Model of
Software Development and Enhancement". It was developed as an iterative model which includes risk analysis and
risk management. This model combines some key aspects of waterfall model and rapid prototyping methodologies.

This model is mostly used in large, expensive and complex projects. It is reasonable to use the spiral model in project
where business goals are unstable but architecture must be realized well enough to provide high coding and stress
ability. It is a system development method (SDM) which used in information technology also. This model is intended
for large, experienced and complicated program system. It can be considered as a generalization of the prototyping
model. The spiral model is the most general. Most life cycle models can in fact be derived as special instances of the
spiral model. This spiral model uses an evolutionary approach to software engineering and it uses prototyping as a
risk reduction mechanism and also it maintains the systematic approach suggested by classic life. For example, the
Spiral Architecture Driven Development is the spiral based SDLC which shows the possible way how to reduce a risk
of non-effective architecture with the help of spiral model in conjunction with the best practices from other models.
It allows for the development of the product to be performing using a prototyping technique or rapid application
development through the use of 4th Generation languages and development tools.

or
1. Spiral Quadrant: Determine objectives, alternatives and constraints:
 Objectives: functionality, performance, hardware/software interface, critical success factors, etc.
 Alternatives: build, reuse, buy, sub-contract, etc.
 Constraints: cost, schedule, interface, etc.
2. Spiral Quadrant: Evaluate alternatives, identify and resolve risks:
 Study alternatives relative to objectives and constraints
 Identify risks (lack of experience, new technology, tight schedules, poor process, etc.
 Resolve risks (evaluate if money could be lost by continuing system development
3. Spiral Quadrant: Develop next-level product:
Typical activites:
 Create a design
 Review design
 Develop code
 Inspect code
 Test product
4. Spiral Quadrant: Plan next phase:
Prepared by: N.P.BHUSAL 10 Email ID: smcnpbhusl@gmail.com
PROGRAMMING LOGIC AND TECHNIQUES
Typical activities:
 Develop project plan
 Develop configuration management plan
 Develop a test plan
 Develop an installation plan

When to use Spiral model:


 When creation of prototype is appropriate.
 When costs and risk evaluation is important.
 For medium to high-risk projects.
 Long-term project commitment unwise because of potential changes to economic priorities.
 Users are unsure of their needs.
 Requirements are complex.
 Significant changes are expected (research and exploration).
Advantages of Spiral model:
o The spiral model is mostly used in large projects and mission-critical projects.
o The model combines the best features of both traditional model and prototype model.
o It is reasonable to use the spiral model in projects where business goals are unstable but the architecture must
be realized well enough to provide high loading and stress ability.
o Risk driven nature of spiral model allows it to accommodate any mixture of prototype oriented, specification
oriented, simulation-oriented or some other type approach.
o Additional Functionality can be added at a later date.
o Strong approval and documentation control.
Disadvantages of Spiral model:
Model is not suitable for small project.
Can be a costly model to use.
Model requires expertise in risk management and excellent management skills.
Different persons involve in the project may find it complaint to use.
The large number of intermediate stages can create additional internal and external documentation to process.

SN. Waterfall model Spiral model


1. The waterfall model is often also referred to as It is reffered to as a realistic model.
the linear and sequential model.
2. Customers are not directly involved for the Customers are directly involved for the
development of program. development of program.
3. When the development process shifts to the next It helps in back tracking, reversing or revising the
stage, there is no going back in this model. process.
4. It is suitable for simple and single version It is suitable for larger, Iterative and complex
projects. projects.
5. It focuses to detail study and documentation. It focuses to risk management and custumer
satisfaction.

Explanation of some other software development methods/models:


Iterative model:
It is a software life cycle model that does not attempt to start with a full specification of requirements. Instead of
development begins by specifying and implementing just part of the software, which can then be reviewed in order
to identify further requirements. This model allows a software company to spot and mend problems at the earlier
stages of the software development lifecycle, which makes the development process more flexible. This aim is
achieved by breaking down the whole lifecycle into several iterations, thus handling the process in smaller portions.
The iterative model allows creating the initial version of a software product straight after the first iteration.

Prepared by: N.P.BHUSAL 11 Email ID: smcnpbhusl@gmail.com


PROGRAMMING LOGIC AND TECHNIQUES

V-Model:
The V-model represents a software development process. It is also applicable to hardware development. It may be
considered an extension of the waterfall model. Instead of moving down in a linear way, the process steps are bent
upwards after the coding phase, to form the typical V shape. The V-Model demonstrates the relationships between
each phase of the development life cycle and its associated phase of testing.
When to use the V-Shaped Model:
• Excellent choice for systems requiring high reliability – hospital patient control applications
• All requirements are known up-front
• When it can be modified to handle changing requirements beyond analysis phase
• Solution and technology are known.

Advantages
 Each phase has specific deliverables.
 Higher chance of success over the waterfall model due to the development of test plans early on during the life
cycle.
 Works well for small projects where requirements are easily understood.
Disadvantages
• Little flexibility and adjusting scope is difficult and expensive.
• Software is developed during the implementation phase, so no early prototypes of the software are produced.
• Does not handle iterations or phases
• Does not easily handle dynamic changes in requirements.
• Does not contain risk analysis activities.

Evolutionary Model:
In 1988, Boehm defines the evolutionary process model as a model whose stages consists of expanding increments
of an operational software product. It has been observed that the software engineer should accept the fact that
failures in the first version of an application inevitably lead to the need for redoing. It is also called incremental
approaches of the software development. This type of model consists of stepwise development, in which parts of
some stages are postponed in order to produce some useful set of functions earlier in the development of the project.
Multiple development cycles take place here, making the life cycle a “multi-waterfall” cycle. Cycles are divided up
into smaller, more easily managed iterations. Each iteration passes through the requirements, design,
implementation and testing phases. A working version of software is produced during the first iteration, so you have
working software early on during the software life cycle. Subsequent iterations build on the initial software
produced during the first iteration.
Advantages:
• Generates working software quickly and early during the software life cycle.
• More flexible – less costly to change scope and requirements.
• Easier to test and debug during a smaller iteration.

Prepared by: N.P.BHUSAL 12 Email ID: smcnpbhusl@gmail.com


PROGRAMMING LOGIC AND TECHNIQUES
• Easier to manage risk because risky pieces are identified and handled during its iteration.
• Each iteration is an easily managed milestone.

 Customers can “see” the system requirements as they are being gathered
 Developers learn from customers
 A more accurate end product
 Unexpected requirements accommodated
 Allows for flexible design and development
 Steady, visible signs of progress produced
 Interaction with the prototype stimulates awareness of additional needed functionality

Disadvantages
• Each phase of an iteration is rigid and do not overlap each other.
• Problems may arise pertaining to system architecture because not all requirements are gathered up front for the
entire software life cycle.

Benefits of Evolutionary Model:


Successful use of EVO can benefit not only business results but marketing and internal operations as well. From a
business perspective, the biggest benefit of EVO is a significant reduction in risk for software projects. This risk
might be associated with any of the many ways a software project can go awry, including missing scheduled
deadlines, unusable products, wrong feature sets, or poor quality. By breaking the project into smaller, more
manageable pieces and by increasing the visibility of the management team in the project, these risks can be
addressed and managed.

Evolutionary Development in Practice


Some form of EVO has been used in at least eight Hewlett-Packard divisions in over ten major projects. Much of this
has been done drawing on expertise from HP’s Corporate Engineering software initiative, which is a central service
group of consultants in software engineering and management. The software initiative group is currently leveraging
existing experience and promoting the use of EVO at HP.

RAD model:
RAD Stands for Rapid Application Development. It is an incremental software development process model that
emphasizes an extremely short development cycle. The RAD model is a “high speed “adaptation of linear sequential
model in which development is achieved by using component-based construction. The RAD model is a high-speed
adaptation of the linear sequential model / Waterfall model.
When to use RAD:
• Reasonably well-known requirements
• User involved throughout the life cycle
• Project can be time-boxed
• Functionality delivered in increments
• High performance not required
• Low technical risks
• System can be modularized

Some Strengths of RAD:


• Reduced cycle time and improved productivity with fewer people means lower costs
• Customer involved throughout the complete cycle minimizes risk of not achieving customer satisfaction and
business needs
• Uses modeling concepts to capture information about business, data, and processes.

This RAD approach encompasses the various phases like:


Business Modelling, Data Modelling, Process Modelling, Application generation and Testing & turnover
Limitations of RAD Model:
• Accelerated development process must give quick responses to the user
• Risk of never achieving closure
• Hard to use with legacy systems
• Requires a system that can be modularized
• Developers and customers must be committed to rapid-fire activities in an abbreviated time frame.

Prepared by: N.P.BHUSAL 13 Email ID: smcnpbhusl@gmail.com


PROGRAMMING LOGIC AND TECHNIQUES

Big Bang Model:


The main beauty of Big Bang model of software development is its simpler concept. In this model there is no proper
planning or little planning, scheduling or any other formal development process. In this method all the effort spent
on developing the software and writing code. This model develops the complete solution once and in one go so, it
termed as Big Bang. It is an ideal process if the product requirements are not well understood and the final release
date is flexible. So, the Developer works in isolation for some extended time period. It is also important to have
flexible customers, too, because they will not know what they are getting until the very end. In this method the
developer also hopes client is satisfied.

Prepared by: N.P.BHUSAL 14 Email ID: smcnpbhusl@gmail.com

You might also like