T.Fatimah Al-Qahtani
Details
• Textbook:
• C++ How to Program, DETITEL & DEITEL, eighth(or) seventh edition.
2
• Website :
• http://cpp242.wordpress.com
3
• Contact me :
1- office Hours :
Sunday from ( 12:30 to 3:30 p.m.)
Monday from ( 2:30 to 3:30 p.m. )
Wednesday from ( 2:30 to 3:30 p.m. )
4
• E-mail :
• Fatma.pnu@Hotmail.com
5
Evaluation
Grade
Date
Midterm1
10 %
(on 18-5-1436
M2) (on 17-51436 M1)
Midterm2
15 %
(on 1-7-1436 M2 /
30-6-1436 M1)
Lab
20 %
Participation and
Attendance
5%
Final lab
10 %
Final
40 %
6
Lab Grades
Evaluation
Grade
Date
Evaluations
5%
Weeks 8 & 12
Homework
10 %
Lab Quiz
5%
Week 9 ( After
Vacation )
7
Topics
Topics to be covered
Introduction
Data types, variables, values, assignment
Sequence, iteration, branching statements
Functions
Arrays
Pointers
8
Introduction
9
Computer
Device capable of performing computations and making logical decisions.
Hardware
Software
- Computer programs.
Programs
that run computer.
on
- Program is a sequence of instructions, written to perform a specified task with a computer.
-It is any physical device, something that you are able to touch. - Various devices comprising computer, E.g. (Keyboard, disks, memory, CD-ROM, processing units). 10
Programming Languages
Used to write sequence of instructions that instruct computers to perform specific tasks.
Some are directly understandable by computers.
Others require intermediate translation steps.
• Three types of Computer Languages:
1) Machine language.
2) Assembly language.
3) High-level languages.
11
1)
Programming Languages
Machine
language
(cont.)
• Instruct computers to perform elementary operations.
• Generally consist of strings of 0s and 1s.
• Only language computer directly understands.
• “ Natural language ” of computer.
• Cumbersome for humans.
• Too slow, tedious and error prone for most programmers.
Example:
Adding overtime pay to base pay and storing