Intro Ducat Ion
-
Upload
syed-ali-haider -
Category
Documents
-
view
222 -
download
0
Transcript of Intro Ducat Ion
![Page 1: Intro Ducat Ion](https://reader031.fdocuments.in/reader031/viewer/2022021215/577d33ad1a28ab3a6b8b6c9c/html5/thumbnails/1.jpg)
8/8/2019 Intro Ducat Ion
http://slidepdf.com/reader/full/intro-ducat-ion 1/24
1 Air University
Introduction to Programming
Introduction [email protected]
![Page 2: Intro Ducat Ion](https://reader031.fdocuments.in/reader031/viewer/2022021215/577d33ad1a28ab3a6b8b6c9c/html5/thumbnails/2.jpg)
8/8/2019 Intro Ducat Ion
http://slidepdf.com/reader/full/intro-ducat-ion 2/24
2
³Introduction to
Computer Science and
Programming in C++´
![Page 3: Intro Ducat Ion](https://reader031.fdocuments.in/reader031/viewer/2022021215/577d33ad1a28ab3a6b8b6c9c/html5/thumbnails/3.jpg)
8/8/2019 Intro Ducat Ion
http://slidepdf.com/reader/full/intro-ducat-ion 3/24
3
What is Computer
Science?
Scientific study of computers.
³What can and can¶t computers do?´ ³If a computer can do something,
how can we do it efficiently?´
![Page 4: Intro Ducat Ion](https://reader031.fdocuments.in/reader031/viewer/2022021215/577d33ad1a28ab3a6b8b6c9c/html5/thumbnails/4.jpg)
8/8/2019 Intro Ducat Ion
http://slidepdf.com/reader/full/intro-ducat-ion 4/24
4
What is a computer?
A device that executes a sequence of
computations and instructions. Modern computers are electronic and digital.
![Page 5: Intro Ducat Ion](https://reader031.fdocuments.in/reader031/viewer/2022021215/577d33ad1a28ab3a6b8b6c9c/html5/thumbnails/5.jpg)
8/8/2019 Intro Ducat Ion
http://slidepdf.com/reader/full/intro-ducat-ion 5/24
5
Program
³A precise sequenceof steps to
solve a particular problem´
![Page 6: Intro Ducat Ion](https://reader031.fdocuments.in/reader031/viewer/2022021215/577d33ad1a28ab3a6b8b6c9c/html5/thumbnails/6.jpg)
8/8/2019 Intro Ducat Ion
http://slidepdf.com/reader/full/intro-ducat-ion 6/24
6
Critical Skills
Analysis
Critical Thinking Attention to Detail
![Page 7: Intro Ducat Ion](https://reader031.fdocuments.in/reader031/viewer/2022021215/577d33ad1a28ab3a6b8b6c9c/html5/thumbnails/7.jpg)
8/8/2019 Intro Ducat Ion
http://slidepdf.com/reader/full/intro-ducat-ion 7/24
7
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
checks and tests
![Page 8: Intro Ducat Ion](https://reader031.fdocuments.in/reader031/viewer/2022021215/577d33ad1a28ab3a6b8b6c9c/html5/thumbnails/8.jpg)
8/8/2019 Intro Ducat Ion
http://slidepdf.com/reader/full/intro-ducat-ion 8/24
8
PAY ATTENTION TO DETAIL
These skills are useful for
anybody All assignments in this course
should follow the these
guidelines
![Page 9: Intro Ducat Ion](https://reader031.fdocuments.in/reader031/viewer/2022021215/577d33ad1a28ab3a6b8b6c9c/html5/thumbnails/9.jpg)
8/8/2019 Intro Ducat Ion
http://slidepdf.com/reader/full/intro-ducat-ion 9/24
9
Computers are
STUPID
![Page 10: Intro Ducat Ion](https://reader031.fdocuments.in/reader031/viewer/2022021215/577d33ad1a28ab3a6b8b6c9c/html5/thumbnails/10.jpg)
8/8/2019 Intro Ducat Ion
http://slidepdf.com/reader/full/intro-ducat-ion 10/24
10
Humans are
even more««.
![Page 11: Intro Ducat Ion](https://reader031.fdocuments.in/reader031/viewer/2022021215/577d33ad1a28ab3a6b8b6c9c/html5/thumbnails/11.jpg)
8/8/2019 Intro Ducat Ion
http://slidepdf.com/reader/full/intro-ducat-ion 11/24
11
Think Reuse
![Page 12: Intro Ducat Ion](https://reader031.fdocuments.in/reader031/viewer/2022021215/577d33ad1a28ab3a6b8b6c9c/html5/thumbnails/12.jpg)
8/8/2019 Intro Ducat Ion
http://slidepdf.com/reader/full/intro-ducat-ion 12/24
12
Area of the Ring
Outer Circle
Inner Circle
Area of Inner Circle ____ Area of Outer Circle = Area of the Ring
![Page 13: Intro Ducat Ion](https://reader031.fdocuments.in/reader031/viewer/2022021215/577d33ad1a28ab3a6b8b6c9c/html5/thumbnails/13.jpg)
8/8/2019 Intro Ducat Ion
http://slidepdf.com/reader/full/intro-ducat-ion 13/24
13
T
hink Reuse Think User Interface
Comments liberally
![Page 14: Intro Ducat Ion](https://reader031.fdocuments.in/reader031/viewer/2022021215/577d33ad1a28ab3a6b8b6c9c/html5/thumbnails/14.jpg)
8/8/2019 Intro Ducat Ion
http://slidepdf.com/reader/full/intro-ducat-ion 14/24
14
Books Ivor Horton¶s
Deitel & Deitel :± C++ How to Program
![Page 15: Intro Ducat Ion](https://reader031.fdocuments.in/reader031/viewer/2022021215/577d33ad1a28ab3a6b8b6c9c/html5/thumbnails/15.jpg)
8/8/2019 Intro Ducat Ion
http://slidepdf.com/reader/full/intro-ducat-ion 15/24
15
Course Objectives
Objectives of this course are three fold
1. To appreciate the need for a programminglanguage
2. To introduce the concept and usability of
the structured programming methodology
3. To develop proficiency in making usefulsoftware using the C language
![Page 16: Intro Ducat Ion](https://reader031.fdocuments.in/reader031/viewer/2022021215/577d33ad1a28ab3a6b8b6c9c/html5/thumbnails/16.jpg)
8/8/2019 Intro Ducat Ion
http://slidepdf.com/reader/full/intro-ducat-ion 16/24
16
Course ContentsTo achieve our first two objectives we
will be discussing Basic Programming constructs and
building blocks
Structured programming Structured flowcharts, pseudo-code
![Page 17: Intro Ducat Ion](https://reader031.fdocuments.in/reader031/viewer/2022021215/577d33ad1a28ab3a6b8b6c9c/html5/thumbnails/17.jpg)
8/8/2019 Intro Ducat Ion
http://slidepdf.com/reader/full/intro-ducat-ion 17/24
17
Course Contents
History of C Language
Variables and expressions in C Control structures and functions
Arrays and Pointers
Dynamic memory Allocation
![Page 18: Intro Ducat Ion](https://reader031.fdocuments.in/reader031/viewer/2022021215/577d33ad1a28ab3a6b8b6c9c/html5/thumbnails/18.jpg)
8/8/2019 Intro Ducat Ion
http://slidepdf.com/reader/full/intro-ducat-ion 18/24
18
Course Contents File handling
Structures and Unions
Flavor of Object oriented programming
![Page 19: Intro Ducat Ion](https://reader031.fdocuments.in/reader031/viewer/2022021215/577d33ad1a28ab3a6b8b6c9c/html5/thumbnails/19.jpg)
8/8/2019 Intro Ducat Ion
http://slidepdf.com/reader/full/intro-ducat-ion 19/24
19
Software Categories
System Software Application Software
Introduction to µC¶ Language
History
Evolution
Justification
Development Environment of µC¶
![Page 20: Intro Ducat Ion](https://reader031.fdocuments.in/reader031/viewer/2022021215/577d33ad1a28ab3a6b8b6c9c/html5/thumbnails/20.jpg)
8/8/2019 Intro Ducat Ion
http://slidepdf.com/reader/full/intro-ducat-ion 20/24
20
There are two main categories of software
System software
Application Software
![Page 21: Intro Ducat Ion](https://reader031.fdocuments.in/reader031/viewer/2022021215/577d33ad1a28ab3a6b8b6c9c/html5/thumbnails/21.jpg)
8/8/2019 Intro Ducat Ion
http://slidepdf.com/reader/full/intro-ducat-ion 21/24
21
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 theprogram. A C++ compiler compiles C++ programs into
Machine language
![Page 22: Intro Ducat Ion](https://reader031.fdocuments.in/reader031/viewer/2022021215/577d33ad1a28ab3a6b8b6c9c/html5/thumbnails/22.jpg)
8/8/2019 Intro Ducat Ion
http://slidepdf.com/reader/full/intro-ducat-ion 22/24
22
Tools of t
he trade
Editor
Interpreter and Compilers
Debuggers
![Page 23: Intro Ducat Ion](https://reader031.fdocuments.in/reader031/viewer/2022021215/577d33ad1a28ab3a6b8b6c9c/html5/thumbnails/23.jpg)
8/8/2019 Intro Ducat Ion
http://slidepdf.com/reader/full/intro-ducat-ion 23/24
23
Integrated Development Environment
(IDE)
It contains
Editor
Compilers
Debugger
Linkers Loaders
![Page 24: Intro Ducat Ion](https://reader031.fdocuments.in/reader031/viewer/2022021215/577d33ad1a28ab3a6b8b6c9c/html5/thumbnails/24.jpg)
8/8/2019 Intro Ducat Ion
http://slidepdf.com/reader/full/intro-ducat-ion 24/24
24
Preprocessor program processes the code.
Loader puts program
in memory.
CPU takes eachinstruction and
executes it, possibly
storing new data
values as the program
executes.
Compiler creates
object code and stores
it on disk.
Linker links the object
code with the libraries
Loader
Primary Memory
Compiler
Editor
Preprocessor
Linker
Primary Memory
.
.
.
.
.
.
.
.
.
.
.
.
Disk
Disk
Disk
CPU
Disk
Disk Program is created in the
editor and stored on disk.