Lab # 2: Introduction To Programming: EC-102 - Computer Systems and Programming
Lab # 2: Introduction To Programming: EC-102 - Computer Systems and Programming
Lab # 2: Introduction To Programming: EC-102 - Computer Systems and Programming
Usama Wajhi
Outline
1 Lab Grading
2 Lab Report
Lab Report Contents
Lab Report Title
3 Basics of Computer
Programming
What is a computer system?
What is a computer
program?
Why study programming?
4 Evolution of Programming
Languages
5 C++
6 Criteria for Judging Code
Quality
Lab # 2: Introduction to Programming
Problem statement
Algorithm
Flow chart
Code
Conclusion
Lab # 2: Introduction to Programming
One or more inputs are used to provide data, this data is then
processed in some way and the outcome of processing is sent to an
output or it may be stored until some event happens and brings it
to the output.
For processing to take place, there needs to be a set of instructions
of what needs to be done. This set of instructions is known as a
computer program.
Lab # 2: Introduction to Programming
Machine Language
Lowest-level programming language
0s and 1s
Easily understood by computers but is almost impossible for
humans to use
Assembly Language
English-like abbreviations such as MOV, ADD etc.
Translated into a machine language by a program called an
assembler
Many instructions for even a simple task
High level Language
Easier to understand for humans
A compiler is required to convert it into machine language
Single statement is enough to carry out many tasks
Lab # 2: Introduction to Programming
Why C++?
Why C++?
Conciseness
Maintainabilty
Portability
Standardization
ANSI/ISO standardization
Revisions – C++ 98, C++ 2003, C++ 2011, C++ 2014
C vs. C++
Lab # 2: Introduction to Programming
C++
What is Syntax?
What is Algorithm?
What is Code?
Lab # 2: Introduction to Programming
Performance
Simplicity (readability)
Size
Time taken