software programming and development
TRANSCRIPT
Software Programming and DevelopmentPresented to: Waqar Azeem
Presented by: M. Haseeb Akhtar BSCS-(14-32)
Asadullah BSCS-(14-25)
Farwa Shabbir BSCS-(14-09)
Hiba Amjad BSCS-(14-22)
Wasfa Aslam BSCS-(14-07)
Maria Asif BSCS-(14-23)
University of Gujrat
Lahore Campus
Introduction to Computers and Technology
Table of Content
Introduction
Definition
Hardware, software and interaction between the them.
Code and Machine Code
Programming Languages
Language Translators
Planning a computer program and problem solving
Object-orientated programming
File and its types
Introduction:Software development is a complicated process. It requires careful planning
and execution to meet the goals. Sometimes a developer must react quickly
and aggressively to meet ever-changing market demands. Maintaining
software quality hinders fast-paced software development, as many testing
cycles are necessary to ensure quality products.
Definition:A computer program is a set of instructions or statement to be carried out by
the computer. It is a set of step by step instructions that directs the computer
to do the tasks you want it to do and produce the results you want.
There are at least two good reason for learning programming:
Programming helps you understand computers.
Writing a few programs increases your confidence level.
Hardware:
Computer Hardware is the collection of physical parts of the computer system.
Main examples of hardware are:
Motherboard
Processor
Hard drive
RAM etc.
Software:
Software is a set of instruction that makes the computer to perform task. In
other words software tells the computer what to do.
It also creates an interface between
computer hardware and user.
Type of Program Input What the Program Does Output
Word processor Characters you type from
the keyboard
Formats the text; corrects
spelling etc.
Displays and prints neatly
organized text
Interaction between Software and
hardware:
Hardware and software are inter-related.
User inputs the instruction of data into the computer with the help of
software.
Computer hardware doesn’t know what action to be performed on that
instruction without software.
Code:
A set of symbols and mnemonics for representing something. For example,
most computers use ASCII codes to represent character.
In programming, code is of two types:
Source code:
It is the list of commands to be assembled or compiled into an executable computer
program.
Object code:
It refers to the code produced by the compiler or assembler.
Machine Code:
Machine code, also called machine language, is a computer programming
language consisting of binary or hexadecimal instructions which can be
directly executed by the computer.
It is the language into which all programs
must be converted before they can
be run.
Programming Languages:
The language used to write a program is called programming language.
it is the way of creating set of instructions.
Creates a source code.
Low Level Languages:
Instruction given to the computer in the binary form.
It is further divided into two types.
Low-Level Language
1st Generation 2nd Generation
1st Generation Language:
1st generation language is also known as Machine language.
By using machine language, a programmer creates instructions in the form
of binary codes (i.e. 1’s and 0’s).
2nd Generation Language:
2nd generation language is also called assembly language.
It uses simple phrasing in place of the complex series of binary numbers,
used in machine language.
To develop a software with it, a programmer uses text editor for source files.
A special translator program is used to convert source files into object code.
This special translator program is called assembler, that converts assembly
language instructions into machine language.
High-level Languages:
It is the language that is easily understood by the humans and written in the
form of human friendly manner.
It consists of different functions to create a program.
It is divided into three categories.
3rd Generation Languages:
There are four languages that are categorized in 3rd generation languages.
These four languages are:
C
C++
Java
ActiveX
C Language:
C is a powerful language that is used to create programs with fast and
efficient code.
It is extremely popular with professional developers.
C compiler is used to compile or translate code written on it into machine
readable form.
Turbo C is a common example of C compiler.
C++ Language:
C++ is an object oriented implementation of C.
It is an extremely efficient and powerful language.
It also uses C compiler for the same purpose as C language.
Turbo C is used for compiling both C and C++ language.
Java:
It creates cross-platform programs.
Java enables web page designer to include small applications called
applets in web pages.
It creates self-contained functions.
ActiveX:
It is Microsoft’s answer to java.
It can create signed applications that has been verified as being safe to
run on a computer.
It can also create self contained functions.
4th Generation Languages:
4GL uses text environment or visual environment.
In text environment, the programmer uses English text or word.
In visual environment, the programmer uses toolbar to drag items like labels,
test boxes and buttons to make an application.
4GL includes:
.NET
Authoring Environment
Sun Studio One
.NET:
It is Microsoft’s newest entry.
It combines several programming languages into one IDE.
For example, Visual basic, C++,C# and J#.
Programs can be written for windows, www and pocket pc.
Authoring Environment:
Authoring environment consists of special programming tools to create:
Multimedia
Applications
Web pages (e.g. Macromedia Director)
It includes its own language which is called scripting language.
Sun Studio One: It is used to for java for visual editing.
It is developed by sun, the creators of Java.
5th Generation Language:
In principle, a 5GL would use artificial intelligence to create software based
on description of what the software should do.
This type of system is proving more difficult to invent than the code it was
intended to create.
It is basically a conceptual language.
Language Translators:
For converting the source code into object code, translators or converters
are used.
These translators are of three types:
Assembler
Compiler
Interpreter
Assembler is not commonly used, so we’ll only discuss the compiler and
interpreter.
Compiler:
Translates the whole program at a time.
Common reason to convert all the source code into object code is to
creating an executable file.
Each programming language requires its own compiler to translate code
written in that language.
For example, the programming language C++ requires a C++ compiler,
while the language Pascal requires a Pascal compiler.
The source code is translated into object code successfully with the help of
compiler if it is free of errors.
If there is any error in the source code, the compiler identifies the error at the
end of the compilation.
The error must be removed for successful compilation.
Interpreter:
translates the source code into machine code statement by statement is
called interpreter.
Translate one line at a time and executes it.
if an error comes, translation process will be terminated.
Makes it easier to detect and remove errors in the source program.
It is a time consuming process of translating and executing statement one
by one.
Each time the program is run, the source code is translated again, and for
this purpose you must have a translator program (interpreter) permanently
in your computer.
Basic difference between Compiler
and Interpreter:
Compiler Takes the entire
program as an input
Interpreter takes single
instruction as input
Basic difference between Compiler
and Interpreter:
Program execution is
very fast.
Program execution is
very slow.
Basic differences between Compiler
and Interpreter:
It is difficult to trace a
problem in compiler.
It is easy to trace a
problem in interpreter due
to line by line interpreting.
Basic differences between Compiler
and Interpreter:
Errors are displayed
after the entire program
is checked
Errors are displayed for
every instruction
Planning a Computer Program and
problem solving:
Planning means creating an image about what will you do in future.
In computer programming, it means creating an image about how you will
create a specific program.
Planning and problem solving of a computer program can be divided into
three types:
Algorithms
Flow Charts
Pseudo Codes
Algorithms:
It is a set of well defined instructions in a sequence to solve a problem.
An Algorithm should have:
A clear starting point.
Precisely defined input/output parameters.
Clear processing steps.
A clear stopping point
It should not have computer code, instead, it should be written in simple and
efficient format, which can be used in writing a code.
It is written in a format that is closer to high-level language.
For example: Algorithm of Addition of two numbers
Step 1: Start
Step 2: Declare variables number1,number2 and sum
Step 3: Read values
Step 4: Add number1 and number2 and store in sum
Step 5: Display sum
Step 6: Stop
Flow Charts:
It is a visual representation of an Algorithm.
You can also say that is the diagrammatic representation of an algorithm.
Importance of Flow chart:
Using flow chart technique, the sequence of program can be easily determined.
It is used to convert algorithm in simple program flow form.
Different symbols are used to show the flow of program
E.g.:
Start or
StopConditions
Flow
Flow chart of Addition of two numbers:
Start
Declare number1,
number2 and sum
Read values
Sum=number1+nu
mber2
Display
Sum
Stop
Pseudo Codes:
It is a simple way of writing a program code in a syntax closer to high-level
language.
It does not use program language syntax.
It is a simple phrase to plan our program before we actually develop a
program.
A Pseudo code:
helps to understand the program easy way.
Is easy to understand.
Is generally short and precise.
can be easily detectable to the mistakes and errors.
Pseudo code for addition of two numbers:
A number1
B number2
S sum
Start
Display: enter two numbers
Read: Read numbers
Add: S=A+B
Display: sum, S
Stop