Professional Documents
Culture Documents
Introduction Lab
saqib.rasheed@mail.au.edu.pk
Air University 1
“Introduction to
Computer Science and
Programming in C++”
2
What is Computer
Science?
4
Program
“A precise sequence
of steps to
solve a particular
problem”
5
Critical Skills
Analysis
Critical Thinking
Attention to Detail
6
Design Recipe
To design a program properly, we must:
Analyze a problem statement, typically
expressed as a word problem
Express its essence, abstractly and with
examples
Formulate statements and comments in a
precise language
Evaluate and revise the activities in light of
7
PAY ATTENTION TO DETAIL
These skills are useful for
anybody
All assignments in this course
8
Computers are
STUPID
9
Humans are even
more…….
10
Think Reuse
11
Area of the Ring
Inner Circle
Outer Circle
Area of Outer Circle ____ Area of Inner Circle = Area of the Ring
12
Think Reuse
Think User Interface
Comments liberally
13
Books
Ivor Horton’s
Deitel & Deitel :– C++ How to Program
14
Course Objectives
15
Course Contents
To achieve our first two objectives we
will be discussing
Basic Programming constructs and
building blocks
Structured programming
16
Course Contents
History of C Language
Variables and expressions in C
17
Course Contents
File handling
Structures and Unions
Flavor of Object oriented programming
18
Software Categories
System Software
Application Software
Evolution
Justification
System software
Application Software
20
GETTING STARTED
To write and run C++ programs, you need to have a
text editor and a C++ compiler installed on your
computer. A text editor is a software system that
allows you to create and edit text files on your
computer. Programmers use text editors to write
programs in a programming language such as C++.
A compiler is a software system that translates
programs into the machine language (called binary
code) that the computer’s operating system can then
run. That translation process is called compiling the
program. A C++ compiler compiles C++ programs into
Machine language
21
Tools of the trade
Editor
Interpreter and Compilers
Debuggers
22
Integrated Development Environment
(IDE)
It contains
Editor
Compilers
Debugger
Linkers
Loaders
23
Program is created in the
Editor Disk editor and stored on disk.
Preprocessor program
Preprocessor Disk processes the code.
Compiler creates
Compiler Disk object code and stores
it on disk.
Linker Disk Linker links the object
code with the libraries
Primary Memory
Loader
Loader puts program
in memory.
Disk ..
..
..
Primary Memory
CPU takes each
CPU instruction and
executes it, possibly
storing new data
..
..
values as the program
..
executes.
24