Engineering Computer Programming I: Dr. Eng. Essam Abdrabou
Engineering Computer Programming I: Dr. Eng. Essam Abdrabou
Engineering Computer Programming I: Dr. Eng. Essam Abdrabou
Course Prerequisites
Prerequisites:
No prior programming experience
required
Course Description
This course is designed to provide students with
an in depth coverage of the basics of
programming in C++, which is needed for
application development.
It is planned to make the students well
acquainted with the syntax and semantics of the
C++ programming language.
This is done through teaching the Input/output
instructions, the different data type used in the
language, the different arithmetic operations,
control structures, arrays, and functions.
Administrative Issues
Course web site is available at:
Book:
Programming in C++, McGraw Hill,
2009.
Software
Grading
Your grade will be determined as
follows:
One Midterm (20%)
One Final Exam (40%)
Course Work (40%)
Quizzes, Attendance, Participation,
Homework (15%)
Practical Exam. (15%)
Labs. (10%)
Discipline
Please be on time to class!
Please do not talk to your friends and
neighbors in class!
It disturbs everyone, and makes it hard
to concentrate.
If you have a question, just ask me!
Syllabus
Week
Week
Week
Week
Week
Week
Week
Week
Week
1: Missed
2: This Introduction
3: Variables, Basic Mathematics
4: Decision (If/Else)
5-6: Iterations (Loops)
7-8: Mid Term
9-12: Arrays
13-14: Functions
15: Final
What is a Computer?
Computer
Device capable of performing computations
and making logical decisions
Computers process data under the control of
sets of instructions called computer programs
Hardware
Various devices comprising a computer
Keyboard, screen, mouse, disks, memory, CDROM, and processing units
Software
Programs that run on a computer
Computer Organization
Six logical units in every computer:
Input unit
Obtains information from input devices (keyboard, mouse)
Output unit
Outputs information (to screen, to printer, to control other
devices)
Memory unit
Rapid access, low capacity, stores input information
Evolution of Operating
Systems
Batch processing
Do only one job or task at a time
Operating systems
Manage transitions between jobs
Increased throughput
Amount of work computers process
Multiprogramming
Computer resources are shared by many jobs or
tasks
Timesharing
Computer runs a small portion of one users job
then moves on to service the next user
Personal Computing,
Distributed Computing, and
Client/Server Computing
Personal computers
Distributed computing
Computing distributed over networks
Client/server computing
Sharing of information across computer
networks between file servers and
clients (personal computers)
Assembly languages
English-like abbreviations representing elementary
computer operations (translated via assemblers)
Example:
LOAD BASEPAY
ADD OVERPAY
STORE GROSSPAY
19
Object-oriented programs
Easy to understand, correct and modify
Hybrid language
C-like style
Object-oriented style
Both
20
Structured Programming
Structured programming
Disciplined approach to writing
programs
Clear, easy to test and debug and easy
to modify
Basics of a Typical C+
+ Program
Development
Environment
Phases of C++ Programs:
1. Edit
2. Preprocess
3. Compile
4. Link
5. Load
6. Execute
A Simple Program:
Printing a Line of Text
Comments
Document programs
Improve program readability
Ignored by compiler
Single-line comment
Begin with //
Preprocessor directives
Processed by preprocessor before
compiling
Begin with #
24
25
A Simple Program:
Printing a Line of Text
Standard output stream object
std::cout
Connected to screen
<<
Namespace
Escape characters
\
Indicates special character output
26
A Simple Program:
Printing a Line of Text
Escape Sequence
Description
\n
\t
\r
\a
\\
\"
27
28
Homework #1
Write the following program and
check how it is working.
29
30