Lec 1
Lec 1
Computer
Programming
Lecturer : Dr. Eman Salah Abass
General Course Information
Course Content: Computer Programming ( C++)
Lecturer: Dr. Eman Salah Abass
[email protected]
# of credit hours: 2
Class meeting time and room:
Regular classes: MON 2:00 – 03:30 pm ,WED 10:40 –12:10 pm
12:30 – 01:50 pm.
Office hours: TUE 12:30 – 1:50 pm, or by appointment but email is the
best way to get hold of me. Please fill free to contact me.
Course Structure
Lecture:
Meets once per week for 60 minutes
Attendance is required (10% of grade)
Short quizzes at the end of lecture
Laboratory:
Meets once per week for 60 minutes
Attendance is required
Homework assignments and recitation work from the previous week are due at
the beginning of lab.
Expectations
Attendance is required for both lecture and Lab.
Students should prepare for recitation each week by reading through the
lab prior to recitation and completing any required pre-work.
Assignments must be turned in on time.
Homework will not be accepted late and quizzes cannot be made up.
Working with other students is encouraging. However, all assignments
that you turn in must be your own work! All students turning in duplicate
documents will receive a zero on the assignment including the student
that actually completed the work.
Course Outlines
Chapter 1
C ++ and object oriented
Programming
brief history
• Early, programmers used the machine language(ones and
zeroes )
• Assembly language (uses mnemonics as ADD & MOV )
• Assemblers used to Translate assembly language to machine language
• higher level languages (BASIC , COBOL , FORTRAN and C)
• Interpreter translates a program as it reads it. It executes the
program codes line by line.
• Compiler translates the whole program into an intermediary form
and produces an object file. Then a linker turns the object file into
an executable file. After that the program as a whole can be
executed
structured programming vs.
object oriented programming (OOP)
object-oriented programming
• Object oriented programming has taken the best ideas of
structured programming and has combined them with several
powerful concepts that allow you to organize your programs
more effectively.
• All object oriented programming languages have three
common properties: encapsulation, inheritance and
polymorphism.
Encapsulation
Inheritance
Polymorphism
• Poly means many, and morph means form. Polymorphism
refers to the same name taking many forms.
improvements of C++
• C++ fully supports object – oriented programming that responds to
programmers needs.
• A better C
• C++ is also a superset of C it is an expanded and enhanced
version of C that supports object oriented programming (OOP).
• Efficiency
• Systems are easier to express and understand
• Maximal power with libraries
• Source–code reuse with templates
• Building large programs
The
development
cycle
Your first C++ program
// first .cpp
// my first program
# include <iostream.h>
void Main ( )
{
Cout << "/n C ++ is a
better C";
}
Multiple choice answers
ch 1
1. A
2. C
3. D
4. B
5. D
6. A
7. A