Programming Fundamentals lecture 2
-
Upload
rehan-ijaz -
Category
Engineering
-
view
280 -
download
4
Transcript of Programming Fundamentals lecture 2
Introduction to
Programming
REHAN IJAZ
By
Programm
ing Fundamentals
About Computer Program In computing, a program is a specific set of ordered operations for a
computer to perform.
Typically, the program is put into a storage area accessible to the computer.
The computer gets one instruction and performs it and then gets the next
instruction.
The storage area or memory can also contain the data that the instruction
operates on.
About Programming Programming is the process of writing instructions in any computer
programming language to get any specific objective.
Process of writing instructions is based on some logic.
Your first step is to figure out exactly what you want your program to do
Chalk out the steps on paper (algorithm)
About Programming language
A programming language is a special language programmers use to develop
applications, scripts, or other set of instructions for computers to execute.
programming languages provide methods for sending input into the computer
program so that it can be manipulated
Examples BASIC, C, C++, COBOL, FORTRAN, Ada, and Pascal.
About Machine Language
Machine language consisting of binary digits which a
computer can respond to directly.
Machine language is the only language a computer is
capable of understanding directly.
Every processor or processor family has its own
machine code instruction set. Instructions are patterns
of bits that by physical design correspond to different
commands to the machine.
About Assembly Language
David J. Wheeler created the first assembly
language. While working as part of a team on
the Electronic Delay Storage Automatic
Computer,
About Assembly Language
Sometimes referred to as assembly or ASL, assembly language is a low-level
programming language used to interface with computer hardware.
Assembly language uses structured commands as substitutions for numbers
allowing humans to more easily read the code versus looking at binary.
Although easier to read than binary, assembly language is a difficult language
and is usually substituted for a higher language such as C.
About Assembly Language
Assembly language uses a mnemonic to represent each low-level machine
instruction or operation.
Assembly language is converted into executable machine code (object code)
by a utility program referred to as an assembler; the conversion process is
referred to as assembly, or assembling the code.
Example of Assembly Language
About C++
C, an early systems programming language, was developed by
Dennis Ritchie and Ken Thompson at Bell Labs between 1969 and
1973.
C++ is a high-level programming language developed by Bjarne
Stroustrup at Bell Labs beginning in 1979.
About C++ C++ is a Machine Independent Language.
C++ Provides huge Function Library
C++ is an Object Oriented Programming Language (OOPL).
C++ can be used for developing System Software viz., operating systems, compilers,
editors and data bases.
C++ is suitable for Development of Reusable Software. , thus reduces cost of
software development.
Example of Source Code
#include <iostream>int main(){
cout << "Hello World!" << endl;return 0;
}
Steps involved in C++ program
you should first write the program
Save the program
Compile the Program ( Alt+F9)
fix the syntax errors, if identified by the complier
Re-compile the program
Run the program (Ctrl + F9)
See the output, if any
Program Life Cycle
1. Come up with an idea for a program.
2. Decide the probable identity of the typical user of the program.
3. Pick computer language(s) to use.
4. Design the program by using pseudocode or any other tool to outline
the structure of the program.
5. Write the program.
6. Test the program.
Step 6 is known as alpha testing.
Program Life Cycle
7. Fix any problems that you discover during alpha testing.
Repeat Steps 6 and 7 as often as possible.
8. Give out copies of the program to other people to test.
Step 8 is known as beta testing. The idea is to let total strangers use your
program so they can tell you what they like and dislike.
9. Fix any problems that people discover during beta testing.
Repeat Steps 8 and 9 as often as possible.
10. Release the program
Thank you