Introduction From Problem Analysis To Design Class Notes For Programming Students
Introduction From Problem Analysis To Design Class Notes For Programming Students
COMPUTER
PROGRAMMING
Sonam Yar
Lecturer Computer Science
Pre-requisite
[email protected]
Course Outline
• Programming and Problem analysis
• Flow charts
• Development of basic algorithms
• Translation of algorithms into programs
• Structured Programming
• Object Oriented Programming
Standard data types
Basic control structures
Functions
Structured data types
Arrays
Structures
Pointer and files
• Testing and debugging
Brief History of Programming
Languages
• Computer rely on directions to do any task
• These directions are called programs.
• People who write programs are called programmers.
• Programmers use a variety of special languages called programming
languages to communicate with the computer.
The Evolution of Programming Languages
(cont'd.)
• High-level languages include Basic, FORTRAN, COBOL, Pascal, C, C++, C#, and
Java
• Compiler: translates a program written in a high-level language machine language
Processing a C++ Program
#include <iostream>
using namespace std;
int main()
{
cout << "My first C++ program." << endl;
return 0;
}
Sample Run:
My first C++ program.
Processing a C++ Program (cont'd.)
• Algorithm:
• Get length of the rectangle
• Get width of the rectangle
• Find the perimeter using the following equation: