eee241-week1
-
Upload
semsettin-karakus -
Category
Documents
-
view
5 -
download
1
description
Transcript of eee241-week1
-
Sayfa 1
EEE 241 Computer Programming
Original notes by
Dr. Ahmet Bingl
Modifications by
Dr Andrew Beddall,
Dr Bahattin Kanber
Week 1
Introduction
to the course
-
Sayfa 2
Introduction to Computer Programming
Computer programming is an essential part of the
work of many scientists and engineers.
This semester we will teach theC++ Programming Language which
is not easy to learn (compared to Fortran)
Is a huge language with a lot of technical details
is good at system and application programming
is mostly prefered by engineers and young programmers!
is widely used in the software industry
We will concentrate on only a very basic/minimal subset of C++
-
Sayfa 3
Web Resources for the Course
Course web page (for lecture notes, example questions ....)eee241.gantep.edu.tr
University of Gaziantep C++ resource pagecpp.gantep.edu.tr
- Tutorials, Sample Programs, Howtos
- We will follow the Basic tutorial section.
C++ Resources Network: www.cplusplus.com
C++ Reference:www.cppreference.com
Trke C Programlama Diline Giri:www.gantep.edu.tr/~bingul/c
Also search Google and Wikipedia for anyof the expressions used in this course.
-
Sayfa 4
Course Books
Programming with C++
John R. Hubbard
Schaum Outline Series (2000)
~ 15 $
Practical C++ Programming
Steve Qualline
OReilly Media (2003)
~ 25 $
-
Sayfa 5
Course Content
Introduction to Programming
History of C++
Structure of C++
C++ BasicsFundamental Input / Output, Data Types, Strings, Operators,
Variables, Constants, Intrinsic Functions
Control Structures: Selection & Loops
Functions
Arrays and Vectors
File Processing
-
Sayfa 6
Lectures, Labs, Attendance, ExamsFIRST EDUCATION
Wednesdays two-hour lecture 13:30-15:20 in G3
one-hour programming session in BIM lab 3
The lab is split into two groups:
Surnames A to J at 15:30
Surnames K to Z at 16:30
Attendance You must attend at least 70% of the course
ExamsAll are written exams
First midterm 30%
Second midterm 30%
Final 40%
-
Sayfa 7
Lectures, Labs, Attendance, ExamsSECOND EDUCATION
Wednesdays two-hour lecture 21:30-23:20 in G5
Mondays one-hour programming session in BIM lab 3
The lab is split into two groups:
Surnames A to N at 11:30-12:20
Surnames O to Z at 12:30-13:20
Attendance You must attend at least 70% of the course
ExamsAll are written exams
First midterm 30%
Second midterm 30%
Final 40%
-
Sayfa 8
Computer Labs
We will learn C++ using the Dev-C++ compiler under Windows; you may also use Linux , e.g. Ubuntu, gul4.bim...
Every week you should write a few programs yourselfin the BIM lab (and more in your free time).
In the BIM Computer Labs your programs will be deleted when the computer reboots. So you need
to save them on a flash drive or on the internet.
DO NOT FORGET TO BRING
YOUR LAPTOP or FLASH DISK WITH YOU
-
Sayfa 9
The Computer
See http://en.wikipedia.org/wiki/Computer
A computer is a machine that manipulates data according to
a set of instructions.
The first computers were developed in 19401945, they were very large in size!
Modern computers arebased on integrated circuits
making them very fast
and small in size.
-
Sayfa 10
-
Sayfa 11
Parts of a Digital Computer
A computer can be divided into two main parts:
Hardware and Software.
Hardware (=Donanm)
See http://en.wikipedia.org/wiki/Hardware
Hardware is the electronic and
mechanical parts of the computer.
- Storage Units
- Input Units
- Output Units
- Process Units
-
Sayfa 12
Parts of a Digital Computer
Storage Units
These are used in both input and output of data:
HDD (Hard Disk Drive)
high capacity, relatively cheap, slow.
RAM (Random Access Memory)
low capacity, expensive, but very fast.
Others:
Flash memory (memory cards, USB flash drives), CD, DVD...
-
Sayfa 13
Parts of a Digital Computer
Input Units
Used for input of data:
Keyboard,
Mouse
Touch screen/pad
RAM,
HDD
Flash memory
-
Sayfa 14
Parts of a Digital Computer
Output Units
Used for output of data:
Monitor
Printer
Speaker
RAM
HDD
Flash Memory
-
Sayfa 15
Parts of a Digital Computer
Process Units
CPU: Central Processing Unit
This coordinates the operation of computer system
and performs arithmetic logic operations.
Input unit CPU Output unit
-
Sayfa 16
Parts of a Digital Computer
A program is input from an HDD(1) and executed in RAM(2).
Data is input from a keyboard(3) which is again stored in RAM(4).
The CPU operates on the program and data in RAM(5) and
outputs results to the HDD(6) as well as the monitor(7).
This is all controlled by the CPU requiring only basic
data flow instructions from the programmer.
-
Sayfa 17
Parts of a Digital Computer
Software (=Yazlm)
See http://en.wikipedia.org/wiki/Software
Software consists of programs loaded from storage units.
The programs execute on the computer hardware forming,
for example,
Operating System (OS)
Compilers
Application Programs
-
Sayfa 18
Parts of a Digital Computer
Operating System (OS)
The OS is a program written to interface between the
computer and its user. All other software runs under the OS.
Examples are:
Miscrosoft Windows (XP, Vista, 7)
Linux (e.g. Redhat, Ubuntu, Pardus)
Mac OS X.
These are all created using C++
-
Sayfa 19
Parts of a Digital Computer
Compilers
See http://en.wikipedia.org/wiki/Compiler
Many programming languages require a compiler to
translate the statements of program written in a high level
language into a low level language (machine code).
Examples are:
Fortran
C, C++
Java
Pascal
Basic.
These are all created using C++
-
Sayfa 20
Parts of a Digital Computer
Application Programs
These are (usually compiled) programs written to perform
a specific task.
Examples are:
Microsoft Word
AutoCAD
Mozilla Firefox....
These are all created using C++
-
Sayfa 21
Next week we will look at
C++ Structure, and programming
Before then please browse through
the course website:
http://eee241.gantep.edu.tr/