0% found this document useful (0 votes)
2 views

4 Computer Software, Programming Language and Program Development

Chapter 6 covers computer software, programming languages, and the program development process. It defines software classifications, discusses various programming languages from machine language to fourth generation languages, and outlines the stages of program development including problem definition, design, coding, debugging, testing, documentation, and maintenance. The chapter emphasizes the importance of precise instructions and logical flow in programming.

Uploaded by

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

4 Computer Software, Programming Language and Program Development

Chapter 6 covers computer software, programming languages, and the program development process. It defines software classifications, discusses various programming languages from machine language to fourth generation languages, and outlines the stages of program development including problem definition, design, coding, debugging, testing, documentation, and maintenance. The chapter emphasizes the importance of precise instructions and logical flow in programming.

Uploaded by

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

Chapter 6

Computer Software, Programming


Languages and Program Development

6.0 Objectives
6.1 Introduction
6.2 Classification of Software
6.3 Programming Languages
6.4 Program Development Process
6.5 Summary
6.6 Check your Progress - Answers
6.7 Questions for Self – Study
6.8 Suggested Reading’s

6.0 OBJECTIVES

Friends after studying this lesson, you will be able to :


 State the definition of software, the classification of software viz Application
Software, System Software, Utility Software and Firmware.
 Discuss various programming languages and their evolution from Machine
Language to Fourth Generation languages, through assembly and high level
languages.
 Describe translators and their types
 Discuss program development process and the various stages in the
development of a computer program.

6.1 INTRODUCTION

As is already seen, a computer cannot do anything on its own. It has to be provided a


detailed set of instructions to perform a specific task to achieve a desired goal, this set of
instructions, which are written in the form which is understood by the computer, is known
as a computer program. The program controls the processing of the computer.

6. 2 CLASSIFICATION OF SOFTWARES

Software means a set of programs, procedures and other associated


documentation which describes what the program does and how it is to be used.
Hardware and software both have to work together. A number of software’s can be run
on the same hardware to perform different types of jobs. The software acts as an interface
between the user and the computer.
Software is mainly classified into:
 Application Software
 System Software

6.2.1 Application Software:


Application software is a program or a set of programs which are written to carry
out a specific application.eg. Payroll, financial accounting etc. Nowadays special
application software or packages for specialized areas like drawing, engineering,
manufacturing, banking, and publishing are available. The set of programs which together
make an application package are called application programs.

Computer Software, Programming Languages and Program Development /71


6.2.2 System Software :
The systems software controls the working of the computer system. It helps
the user to use the computer by allowing him to communicate with the system. System
software controls the working of other software’s, hardware, hardware devices like
printers, memory, CPU etc. Thus, they make the operation of the computer more
efficient. The programs included in system software are systems programs. Without
the systems programs, it would not be possible for the application programs to work on
the computer. The systems software is generally provided by the manufacturer of the
computer hardware. Without the systems software the hardware would not work.
6.2.3 Utility Software:
These are a set of programs or tools which are used in program development or
for performing limited tasks, eg. scandisk.
6.2.4 Firmware:
With the advances in technology it is now possible to make the software
available on ROM (Read Only Memory) chips. These chips, which form a part of the
software, have the programs in them. Thus programs available on hardware are called
Firmware. Today not only systems software, but even some dedicated application
programs are being made available on firmware.

Check your Progress - 6.2

1. Match the following.

A B
1. Application Software a. Program to control system working of computer
2. Firmware b. Scandisk
3. Systems Software c. payroll
4. Utility Software d. Software available on Rom chips

2. Answer in 1-2 sentences.


W hat is software?
............................................................................................................................
............................................................................................................

6.3 PROGRAMMING LANGUAGES

A programming language is a means of communication for the user to


communicate with the computer system. The programming language is a set of
instructions which tells the computer what to do. This is a language which is understood
by both man and machine. There are a number of programming languages. However all
these languages are designed to perform at least certain basic instructions and
operations; These instructions and operations are :

- Input/output operations,
- Arithmetic operations - mathematical operations like addition, subtraction,
- Logical operations - Comparison for equality, inequality etc.
- Movement of instructions and data to and from the CPU.

To use the programming language, the programmer has to strictly follow the rules of

Computer Fundamentals/72
the language including all commas, punctuation marks etc. otherwise the program will
not be understood by the computer. Thus, although the programming languages are
much smaller and simpler than the natural languages, they have to be used with the
greatest accuracy.

6.3.1 Types of programming languages


a) Machine Language
b) Assembly Language
c) High Level Language

a) Machine Language:
This is the only language which is understood by the computer. This is the
language nearest to the machine. In this language the programs are written in binary
code i.e. the instructions are made only by a combination of binary digits 0 and 1.
Machine language may vary from machine to machine depending upon the computer
architecture. Machine languages execute the fastest since they are immediately
understood by the computer. No translation
of the programs is required. Also they make efficient use of primary memory. But it is
very difficult to program in this binary or machine language. It is also very tedious and
time consuming, since all the instructions have to represent as a series of Os and 1 s.
Therefore there is always a possibility of errors.

b) Assembly Language:
The Os and 1 s of the machine language were substituted by letters and symbols in
assembly languages. The assembly languages use mnemonics (memory aid) in place
of operation codes. The language uses symbols instead of numbers to write programs. A
program written using such symbols in the assembly language is called the source
program. The program written in assembly language has to be converted into machine
language for use by the computer. This is achieved with the help of the assembler. The
assembler is a system program which is supplied by the manufacturer. It converts the
assembly program into a machine readable program and the resulting program is
called the object program. Thus the input to the assembler is the source program
and the output of the assembler is the object program. The assembler translates
each assembly language instruction into a corresponding machine code.
It is relatively easy to write programs in assembly language as compared to machine

Computer Software, Programming Languages and Program Development /73


language. They can be also modified relatively easily. However, like the machine
language, assembly languages are also hardware dependant. When the machine
changes, the program has to be changed.

Since the machine language and assembly language both are dependent on the
hardware, they are referred to as low level programming languages. Both these
languages require a deep understanding of the internal structure of the computer.

1. High Level Languages :


Higher level languages make use of English like words and statements
and mathematical symbols for instructions. Higher level languages make programming
easier, since they are relatively easy to learn. Less time is required to write programs in
high level languages. The programmer is not required to know the detailed working of
the computer system in order to program in a high level language. They are machine
independent. Higher level languages are also known as problem oriented languages.
However a high level language is not directly understood by the computer. It is
required to be translated into machine language. Therefore they generally execute
more slowly and require more memory than the same program written in assembly
language.
The programs which are used to translate programs written in high level
language into machine language are known as translators.
The types of translators are:

I) Compiler
II) Interpreter

I) Compiler:
The compiler translates the entire source program into machine language
program at once. The source code remains intact. Once a program is compiled it can be
run as many times as required, without being required to be recompiled. A compiler
can translate only those programs which have been written in the language for which it
is designed. Also each machine has to have its own compiler.
A compiler is a program which normally resides on the secondary storage
device. It gets loaded into the CPU when the source program is to be translated. A
compiler checks for errors like illegal symbols, statements etc. during compilation and
gives out a list of error messages at the end of execution. This is a very valuable aid to
the programmer to correct the programs. However, the compiler is incapable of
detecting any logical errors in the program.

II) Interpreter:
The interpreter is the program which translates a high level language program
into machine language as follows :
- it takes one statement from the high level language program
- translates it into a machine instruction and the instruction is immediately executed.
Since the program is translated statement by statement, the machine level program of
the source program is not stored anywhere in memory.

Therefore, the program has to be interpreted every time when it has to be run.
Thus no object code is generated. The interpreted programs are generally slower than
compiled programs. However, if any changes are made in the source program it can
interpret only those statements and it is not required to compile the entire program
again. Interpreters are relatively easy to write and smaller in size as compared to
compilers.
Thus assemblers, compilers and interpreters are systems software which
translate the source program into object program i.e. program which can be understood by
the computer. These translators are also known as language processors.

c) Fourth Generation Languages (4 GL) :


Programming languages are sometimes classified with generations - from the lowest to
the highest.

Computer Fundamentals/74
The First Generation - Machine Language
The Second Generation - Assembly Language
The Third Generation - High4.evel Language

Unlike procedural languages which require that a programmer writes all the
steps to complete the program and generate output, which are related to a more
structural approach towards programming. It is the first standardized language.

 BASIC:
BASIC stands for Beginners All Purpose Symbolic Instruction Code. The
language was developed by Prof. John Kemeny and Thomas Kurtz in USA. It
irrelatively easy to learn. Programs written in BASIC language are interpreted. It
resembles FORTRAN in many ways, but can also be effectively used in business
applications. Thus it can be used for both business and scientific applications. BASIC
is one of one most popular language for use in microcomputer systems.
 COBOL :
Common Business Oriented Language was designed especially for
business applications. A COBOL program is constructed from sentences, paragraphs,
sections and divisions. A COBOL program must have four divisions: the identification
division, the environment division, data division, and the procedure division. Thus
COBOL is a self documenting language. It is one of the most widely used commercial
languages.

 RPG :
Report Generator is a general purpose, business oriented language designed to
generate output reports. The language was developed by IBM and was launched for
use on the IBM 1401 computer. It is best suited for applications where large data files
have to be read and extensive reports are to be output. It has limited mathematical
capability and is not suited for scientific applications.

 PASCAL :
PASCAL has been named after the French mathematician Blaise Pascal; It allows the
programmer to structure the programming language. The features of PASCAL allow it
to be used for both scientific and business applications. It is a very powerful language.
It is implemented on several computers including microcomputers and minicomputers
and is also widely used to teach programming to students and beginners.

 C:
C was designed and developed at Bell Laboratories USA. It is a block structured
language which allows the use of various concepts of structured programming. C also
has the advantage of being able to manipulate internal processor registers of the
computer. Thus it has some powers of the assembly language. C is also very portable.
C is the most popular language used for systems programming like designing
compilers and operating systems.

 LISP:
LISP stands for list processing. This language is mostly used in non numeric
applications which require logical rather than numerical operations. Therefore it is
widely used in games, pattern recognition and artificial intelligence.

Check Your Progress - 6.3


1. Match the following.
A B
(i) COBOL a. Formula Translation
(ii) BASIC b.
Non numeric applications (iii) C c.
Structured Programming
(iv) FORTRAN d.
needs an interpreter
(v) LISP e. widely used language for systems programming
(vi) PASCAL f. Self documenting language

Computer Software, Programming Languages and Program Development /75


6.4 PROGRAM DEVELOPMENT PROCESS

W hile writing a computer program, it is absolutely necessary to write .each


and every instruction in the correct sequence. The logical control of element within the
computer program is the most important aspect of programming.

The various stages in the development of a computer program are :


 Problem Definition
 Program Design
 Coding
 Debugging
 Testing
 Documentation
 Maintenance

6.4.1 Problem Definition:


The first step in the process of program development is the thorough
understanding and identification of the problem for which is the program or software is to
be developed. In this step the problem has to be defined formally. All the factors like
Input/output, processing requirement, memory requirements, error handling, interfacing
with other programs have to be taken into consideration in this stage.
6.4.2 Program Design:
The next stage is the program design. The software developer makes use of
tools like algorithms and flowcharts to develop the design of the program.
 Algorithm:
An algorithm represents the logic of the processing to be performed. It is a sequence of
instructions which are designed in such a way that if they are executed in the specified
sequence, the desired goal is achieved. It is imperative that the result be obtained
after execution of a finite number of steps.
In an algorithm,
- Each and every instruction has to be precise and clear.
- The instruction has to be executed in a finite time.
- W hen the algorithm terminates the desired result should be achieved.

 Flowchart :
A flowchart is a pictorial representation of the algorithm. It represents the
steps involved in the procedure and shows the logical sequence of processing using
boxes of different shapes. The instruction to be executed is mentioned in the boxes.
These boxes are connected together by solid lines with arrows, which indicate the flow
of operation.
The first step in the design of a program is the algorithm. The algorithm is
then represented in the form of a flowchart and the flowchart is then expressed in the
computer language to actually prepare the computer program.

Computer Fundamentals/76
Fig. 6.2 Symbols used in a
flowchart.

The symbols used in the flowchart are:

Terminal (Start/Stop):
The symbol denotes the beginning, ending and halt operation in the program
logic. Thus it is the first and the last Symbols! in any nov-chart to indicate the start and
stop of the process.

Input/output:
Indicates when an input or output operation is to performed in the process.

Processing:
This represents the arithmetic operations like addition, subtraction etc, and
the movement of data in the process

Decision:
The decision symbol is used to represent a point where one or more alternatives
is possible. The criteria for decision making are written in the decision box. On each
path the condition for which the particular path is to be followed has to be written. During
the execution the appropriate path will be followed depending upon the result of the
decision.

Flow lines:
These indicate the flow of operation ie. The sequence of instruction execution. Flow
lines are normally drawn with arrowhead indicating the direction of flow of the program.

Connectors:
A connector is used to indicate the logic flow from one page to another when
the flowchart becomes very long. Connectors do not represent any operation. They are
mainly used in the flowchart for clarity and convenience.

Types of logic used in the flowchart:

Sequential Execution: In this logic the instructions are executed one after the
other sequentially.

Transfer of control: This is a logic which is used when the option to be chosen
depends upon the result of the decision. The control is transferred to a particular path if
the result of the decision branches to that path.

Looping: In looping or repetitive logic, an instruction or a number of instructions are


executed more than once. The instructions are executed till the decision criteria is true.
The decision criteria can be placed before the loop or after the loop depending upon the
statements which are to be executed in the loop.

Computer Software, Programming Languages and Program Development /77


Let us see some examples of writing algorithms and flowcharts.
(1) Write an algorithm and develop a flowchart to convert the temperature input in
Celsius scale to Fahrenheit scale.

Solution :

First write a detailed stepwise algorithm to do the conversion


Step 1: Start.
Step 2: Input temperature in Celsius (C).
Step 3: Convert to Fahrenheit (F) using the formula F = 9/5 * C + 32.
Step 4: Print the temperature in Fahrenheit (F).
Step 5: Stop.

Next on the basis of this step wise algorithm develop the flowchart using the
appropriate flowchart symbols as follows:

Fig 6.3

(2) Write an algorithm and flowchart to read two numbers A and B and compare
them. If
A is greater than B print, A is greater than B else print B is greater
than A. Algorithm :

Step 1: Start.
Step 2: Input values of A and B.
Step 3: Compare values of A and B (Is A >
B?).
Step 4: If yes then print “A is greater than B”.
Step 5: If no, the print “B is greater than A”.

Now draw the flowchart for the above.

Computer Fundamentals/78
Other techniques which can be useful in designing of the program are:

Modular Programming:
Using this method the entire program is divided into smaller manageable
modules so that the smaller modules can be designed, coded and debugged
separately.

Top-Down Design:
Here the overall problem is first defined in terms of general subtask. These
subtasks are divided into further sub tasks.

6.4.3 Coding:

Once the design process is complete, the actual computer program is written,
i.e. the instructions are written in a computer language. Coding is generally a very small
part of the entire program development process and also a less time consuming activity
in reality. In this process all the syntax errors i.e. errors related to spelling, missing
commas, undefined labels etc. are eliminated. For effective coding some of the
guidelines which are applied are
 Use of meaningful names and labels of variables,
 Simple and clear expressions,
 Modularity with emphasis on making modules generalized,
 Making use of comments and indenting the code properly,
 Avoiding jumps in the program to transfer control.

6.4.4 Debugging:

At this stage the errors in the programs are detected and corrected. This stage
of program development is an important process. Debugging is also known as
program validation.

Some common errors which might occur in the programs include:


 Un initialization of variables,
 Reversing of order of operands,

Computer Software, Programming Languages and Program Development /79


 Confusion of numbers and characters,
 Inverting of conditions eg jumping on zero instead of on not zero.

The tools or methods which can be used to debug the programs include:
 Simulator -This is a computer program which simulates the execution of the
program on another computer.
 Logic Analyzers: This test instrument detects the states of digital signals
during each clock cycle and stores them in memory. It then displays this data on
the monitor.
 Breakpoints: This is introduced in the program to halt the execution at
some intermediate point. At this point, the values of the various inputs, outputs,
variables etc. can be checked.
 Software interrupts: This is an instruction which saves the current value of
the program counter and then branches to a specific memory location. At this
location there is the debugging program which displays the status information.
 Memory dump: This gives a listing of the current contents of a section of
the memory. Memory dumps are common in most simulator programs, and
microcomputer systems.
 Trace routine: This program prints the current status of the processor at
specified intervals.

6.4.5 Testing (Validation):


The program is tested on a number of suitable test cases. A test plan of the
program has to be done at the stage of the program design itself. This ensures a
thorough understanding of the specifications. The most trivial and the most special cases
should be identified and tested. It is always useful to include the maximum and minimum
values of all variables as test data.

6.4.6 Documentation:
Documentation is a very essential step in the program development.
Documentation help$ the users and the people who maintain the software. This
ensures that future modification if required can be done easily. Also it is required
during redesigning and maintenance.

6.4.7 Maintenance:
Updating and correction of the program for changed
conditions and field experience is accounted for in maintenance.
Maintenance becomes essential in following situations:
- Change in specification,
- ChangelrY equipment,
- Errors which are found during the actual execution of the
program. Modularity, structured programming, thorough testing
and debugging and proper documentation greatly reduce the time
and cost of maintenance of the software.

Computer Fundamentals/80
Check your Progress - 6.4
1. Answer in 1-2 words.
a. Name any two stages in the development
of a computer program.
................................................................................................
................................................................................................
b. Name any two tools used to develop the program design,
................................................................................................
................................................................................................
c. Name and draw any two symbols used in
flowchart,
...........................................................................................................................
...........................................................................................................................
d. List any two methods used for debugging the program.
...........................................................................................................................
............................................................................................................................
e. List any two situations where the maintenance stage of program development
becomes essential.
..........................................................................................................................
...........................................................................................................................
2. Write algorithms and draw flowcharts for the
following:
a) Input the marks of five subjects of a student.
Calculate the percentage and print the grades as follows:
Grade A for 90% and above, grade B for percentage greater than or
equal to 75 and less than 90 and grade C for percentage less than 75.
b) Find the area and perimeter of a rectangle given the sides s1
and s2.

6.5 SUMMARY

A set of programs, procedures and associated documentation together


constitute the computer software. The computer software is classified as :

Application Software : These carry out specific applications like payroll, financial
accounting etc.

Systems Software : This set of programs controls the execution of the computer
system. It controls the functions of the other software’s, and hardware.

Utility software : These are program tools used in program development or to


perform limited tasks.

Firmware : These are programs available on hardware i.e. ROM


chips.

Programming languages : A language is a set of instructions which tells the


computer what to do. All languages perform the basic operations of input/output,
arithmetic and logic operations and data movement from and to the CPU.
The broad categories of programming languages are:

Computer Software, Programming Languages and Program Development /81


Machine Language : The only language understood by the computer, it is a
language of
Os and 1s. It is machine dependant and difficult for the user to
learn.

Assembly Language : Assembly language uses mnemonics to write the program


code. This is then converted into machine language by the assembler.

High Level Languages : They make use of English like words and statements and
are easy to learn. They are translated into machine language with the use of
compilers and interpreters. Some of the commonly used high level languages are
FORTRAN, BASIC, COBOL, RPG, PASCAL, C, LISP etc.

Fourth Generation Languages : These are non procedural languages. They are
normally used in conjunction of a data base and its data dictionary.

The various stages in the development of a computer


program are:
Problem Definition : Thorough understanding and identification of the problem for
which a program is to be written.

Program Design : Tools like algorithms and flowcharts are used to design the program.
The techniques employed in design are modular-programming, top-down design.

Coding : At this stage, the actual program is written using a computer


language.

Debugging : Here the errors in the program are detected and


corrected.

Testing : A test plan for the program which has been done at the design stage is
applied here to test the program on a number of suitable test cases.

Documentation : This stage ensures that further modifications, redesign and


maintenance can be made easy to the user who maintains the software.

Maintenance : Updating and correction of programs is covered in


maintenance.

Thus a computer program is not just writing code in a computer language,


but a detailed procedure of going through the various stages of definition, design, coding,
debugging, testing, documentation and maintenance.

6.6 CHECK YOUR PROGRESS-ANSWERS


6.2
1. 1 -c 2-d 3-a 4- b
2. Software means a set of programs, procedures and other
associated documentation which describes what the program
does and how it is to be used.
1 a. Machine Language, Assembly Language, High Level language, Fourth
Generation
Languages. .
b. The programs which translate the source programs into object
programs i.e machine programs are called translators, eg.
compiler.
c. The aims of 4 GL are : to develop programs faster, write
programs which can be easily modified and make them easy to
learn.

6.3 (i) - f (ii) -d (iii) -e (iv ) -a (v) -b (vi) –c

Computer Fundamentals/82
6.4
1. a) Problem definition, program design b) Algorithm, Flow chart
c) Connectors, Flow lines d) Break points, simulators e) Change in
specification, change in equipment.
2 a) Algorithm :
Step 1 : Start,
Step 2 : Input marks of five subjects (ml,m2,m3,m4,m5).
Step 3 : Calculate percentage (p = (ml -i- m2 + m3 + m4 + m5)/5).
Step 4 : Check if percentage (p) >= 90.
Step 5 : If yes, print “A grade”.
Step 6 : If no, check if percentage (p) >= 75.
Step 7 : If yes, print “B grade”.
Step 8 : If no, print “C grade”. Step 9: Stop.
Stop

b) Algorithm :
Step 1 : Start.
Step 2 : Enter the sides of the rectangle s1 and s2.
Step 3 : Calculate area (A) = s1 x s2.
Step 4 : Calculate perimeter (P) = 2 * (s1 + s2).
Step 5 : Output area (A) and perimeter (P).
Step 6 : Stop.

Computer Software, Programming Languages and Program Development /83


6.7 QUESTIONS FOR SELF - STUDY
1. Describe the kinds of software.
2. W hat is a programming language? W hat are the types of
programming languages? Describe each in brief.
3. W hat are translators? Describe the types of translators.
4. Describe in brief any two commonly used high level languages.
5. W hat are the steps in the program development? Describe any two.
6. Write short note on Algorithms and flowcharts.
7. Describe in brief the tools used for debugging computer programs.
8. Explain what is maintenance of a computer program and
when it becomes necessary.

6.8 SUGGESTED READING’S


 Computer Fundamentals
Concepts, Systems & Applications – P.K Sinha

REFERENCES

 http://www.tutorialspoint.com/

Computer Fundamentals/84

You might also like