0% found this document useful (0 votes)
12 views7 pages

EXPT 1

Uploaded by

shruti.apv2020
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
12 views7 pages

EXPT 1

Uploaded by

shruti.apv2020
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 7

EXPT NO: 1 DATE:

COMPUTER PROGRAMMING

COMPUTER TERMINOLOGY

Instruction:

An instruction is a command given to the computer (microprocessor) to perform a specified


operation on given data.

Program:

A computer program is a collection of instructions that performs a specific task when executed
by a computer.

Software:

A collection of computer programs, libraries, and related data are referred to as software.
Computer programs may be categorized along functional lines, such as application software
system software and utility software.

1. Application software:
 Application Software are designed for the users to perform their specific tasks.
Application software are very specialized in their function and approach to solving
a problem.
 Examples: word processors, database software, spreadsheet, graphics software,
multimedia software, web browser.
2. System software:
 System Software is designed to manage the system resources and it also provides
a platform for Application Software to run.
 Examples: operating systems, device drivers, firmware, programming language
translators
3. Utility software:
 Utility software is designed to aid in analyzing, optimizing, configuring and
maintaining a computer system.
 Examples: antiviruses, disk cleanup & management tools, compression tools,
defragmenters
PROGRAMMING LANGUAGE

Definition of computer programming

Computer programming is the process of designing and building an executable computer


program for accomplishing a specific computing task.

Types of programming languages

1. Machine language: This language is a string of 0s and 1s that the machines can
understand. It is completely machine dependent.
2. Assembly language: An assembly language is a low-level programming language designed
for a specific type of processor.
3. High level language: This language uses English like statements and is completely
independent of machines. Programs written using high level languages are easy to create,
read and understand.

Program written in high level programming languages like Java, C++, etc. is called source code.
Set of instructions in machine readable form is called object code or machine code.

System software that converts source code to object code is called language processor. There are
three types of language processors.

1. Assembler − Converts assembly level program into machine level program.


2. Interpreter − Converts high level programs into machine level program line by line.
3. Compiler − Converts high level programs into machine level programs at one go rather
than line by line.

Examples of programming languages:

A. BASIC (Acronym for Beginner's All-purpose Symbolic Instruction Code)

Developed as a timesharing language in the 1960s. It has been widely used in microcomputer
programming in the past, and various dialects of BASIC have been incorporated into many
different applications. Microsoft's Visual Basic is widely used.
B. C/C++

Developed in the 1970s at AT&T. Widely used to develop operating systems and commercial
applications. UNIX was the first OS written in C. C++ (C plus plus) is the object-oriented version
of C that is popular because it combines objects with traditional C programming syntax.

C. JAVA

Java is an Object-Oriented Programming Language. It was first released by Sun Microsystems


in 1995. Oracle acquired Sun Microsystems in 2010 and now maintains the release and
support of Java programming language. Java applications support Write-Once-Run-
Everywhere paradigm.

COMPUTER PROGRAMMER:
A computer programmer, sometimes called a coder, is a person who creates computer software.

Skills required to become a programmer:

 The ability to learn concepts and apply them to other problems


 Basic mathematical skills
 A passion for problem solving
 Good communication skills
 Good writing skills
 Confidence around a computer
 Resourcefulness
 An inquisitive mind

GENERATIONS OF PROGRAMMING LANGUAGE


Programming languages in terms of their performance, reliability and robustness can be grouped
into five different generations.

1. First Generation Languages (Machine language)


These are also called low level programming languages. They are translation free and can
be directly executed by the computers. The programs written in these languages are
executed very speedily and efficiently by the CPU of the computer system.
2. Second Generation languages (Assembly Language)
These languages also belong to the category of low level programming languages. The
second generation language comprises assembly languages that use the concept of
mnemonics for writing programs.

3. Third Generation languages (High-Level Languages)


The languages of the third and later generations are considered as high-level languages
because they enable the programmer to concentrate only on the logic of the programs
without considering the internal architecture of the computer system.

4. Fourth generation languages (Very High-level Languages)


The fourth generation programming languages were designed and developed to reduce
the time, cost and effort needed to develop different types of software applications.

5. Fifth generation languages (Artificial Intelligence Language)


The programming languages of this generation mainly focus on constraint programming.
The major fields in which the fifth generation programming languages are employed are
Artificial Intelligence and Artificial Neural Networks.

COMPUTER PROGRAM DEVELOPMENT LIFE CYCLE

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


1. Problem Definition
2. Program Design
3. Coding
4. Debugging
5. Testing
6. Documentation
7. Maintenance
1. Problem Definition:
 The first step in the process of program development is the thorough understanding and
identification of the problem for which 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.
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.
o Algorithm:
An algorithm is a sequence of steps to solve a particular problem.
o Flowchart:
A flowchart is the graphical or pictorial representation of an algorithm with the help
of different symbols, shapes and arrows in order to demonstrate a process or a
program.
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.
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.
5. Testing:
 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.
 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. Documentation:
 Documentation is a very essential step in the program development.
 Documentation helps 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.
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:
o Change in specification,
o Change in equipment,
o Errors which are found during the actual execution of the program.

ERRORS IN COMPUTER PROGRAMMING


There are basically three types of errors that you must contend with when writing computer
programs:

1. Syntax errors
2. Runtime errors
3. Logic errors

1. Syntax errors:
In effect, syntax errors represent grammar errors in the use of the programming language.
Common examples are:
 Misspelled variable and function names
 Missing semicolons
 Improperly matched parentheses, square brackets, and curly braces
 Incorrect format in selection and loop statements
2. Runtime errors
These occur when a program with no syntax errors asks the computer to do something that
the computer is unable to reliably do. Common examples are:
 Trying to divide by a variable that contains a value of zero
 Trying to open a file that doesn't exist
There is no way for the compiler to know about these kind of errors when the program is
compiled.

3. Logic errors
Logic errors occur when there is a design flaw in your program. Common examples are:
 Multiplying when you should be dividing
 Adding when you should be subtracting
 Opening and using data from the wrong file
 Displaying the wrong message

You might also like