ICS 101 Introduction to Computer Programming - PowerPoint PPT Presentation

1 / 30
About This Presentation
Title:

ICS 101 Introduction to Computer Programming

Description:

ICS 101 Introduction to Computer Programming. Ahmad Ridha. aridha_at_kfupm.edu.sa ... Introduction to Computer Programming using FORTRAN 77, Second Edition by Al ... – PowerPoint PPT presentation

Number of Views:192
Avg rating:3.0/5.0
Slides: 31
Provided by: ccseKf
Category:

less

Transcript and Presenter's Notes

Title: ICS 101 Introduction to Computer Programming


1
ICS 101 Introduction to Computer Programming
  • Ahmad Ridha
  • aridha_at_kfupm.edu.sa
  • Information Computer Science Department
  • CCSE - King Fahd University of Petroleum
    Minerals

2
Instructor
  • Name Ahmad Ridha
  • E-mail
  • ahmad.ridha_at_gmail.com
  • aridha_at_kfupm.edu.sa
  • a_ridha_at_ccse.kfupm.edu.sa
  • Office Building 23 Room 016B
  • Phone 1489/1490
  • Office hours ???

3
Lab Schedule
  • Saturday, 02.10pm 05.10pm (15 minutes break for
    prayer time)
  • Building 14 Room 256

4
Course Description
  • An overview of the computer system, its main
    components and their functions. Programming in
    FORTRAN 77 with emphasis on a modular and
    structured problem solving approach that includes
    program coding, algorithm design, debugging and
    testing. Various programming problems will be
    illustrated as examples in the class.

5
Textbook
  • Introduction to Computer Programming using
    FORTRAN 77, Second Edition by Al-Dhaher, et, al.
    KFUPM Press, 1995.
  • If you haven't got it, get it from the Bookstore
    as soon as possible.

6
Grading Policy
  • MAJOR I 20
  • MAJOR II 25
  • FINAL 30
  • LAB WORK 13 (1 _at_ LABS)
  • LAB QUIZZES 12 (2 _at_ QUIZ)

7
Lab Grading Parameters
  • Attendance
  • Quizzes
  • Manners
  • Activity

8
Lab Objective
  • Lab work is given to provide an opportunity for
    students to exercise programming
  • Be active in class and lab discussion
  • Homeworks will be given as exercises for the
    quizzes
  • Practice!!! Practice!!! Practice!!!

9
Remarks
  • Do remind me if I speak too fast or not clearly
    (Most of us are not native speakers).
  • Remind me if I make mistakes (I'm just a human).
  • If there are things you'd like to discuss, meet
    me in office hours or e-mail me.

10
Major Concepts in the Course Description
  • Computer
  • Components
  • Functions
  • Programming
  • Fortran 77
  • Algorithm
  • Coding
  • Testing
  • Debugging

11
Computer
  • What is a computer?
  • From Latin word Computare
  • Where can you find computers?
  • What kinds of computers do we have?

12
What is a computer?
  • Computare to compute
  • Various calculations (arithmetic, logical, ....)
  • Early computers were used to
  • help in census
  • do calculations for weapon use (WW2)
  • crack secret messages (WW2 Enigma machine)
  • An electronic device that can accept input,
    process the input, provide information, run a
    program stored in memory, and store a program

13
Where can we find computers?
  • Obvious forms
  • Desktop computers
  • Laptop/notebook computers
  • Personal Digital Assistant
  • Less obvious forms
  • Smartphones
  • Automatic Teller Machines
  • Home appliances
  • Security devices

14
What kinds of computer do we have?
  • Depends of the category
  • Generation
  • 1st vacuum tubes (1940s)
  • 2nd transistors (1950s)
  • 3rd integrated circuits (IC) (1960s)
  • Very Large Scale Integration a chip can consists
    of millions of transistors

15
Computer
  • Hardware
  • Software
  • Netware
  • Brainware

16
Computer System Hardware
  • Oversimplified diagram
  • Details will depend on the design

17
Computer Components
  • Input devices
  • Output devices
  • Central Processing Unit (CPU)
  • Memory
  • Bus

18
I/O Devices
  • What are the examples of input devices?
  • Can a computer work without mouse and keyboard?
  • What are the examples of output devices?
  • Can a computer work without a monitor?
  • Are there devices that can be both input and
    output devices?
  • Connect computer to the outer environment
    (people, other computers, other devices)
  • Also called peripheral devices

19
Central Processing Unit (CPU)
  • What are the examples of CPUs?
  • Also known as processor
  • Can a computer work with a CPU?
  • The heart of a computer system
  • Performs the execution of instructions given
  • Uses the data stored in the memory

20
CPU
21
Memory
  • An area to store programs and data
  • Based on volatility
  • Volatile
  • Non-volatile
  • Based on function primary and secondary
  • Based on material
  • Semiconductor
  • Magnetic
  • Optical

22
Memory
  • Which is better volatile or non-volatile memory?
  • Why do we still use volatile memory for RAM?
  • Memory is a system

23
Bus
  • All those components need to communicate
  • Communication path ? BUS

24
Software
  • What are examples of softwares?
  • Program
  • Is there a program running in your computers?
  • Simply lists of instructions for the computer to
    execute.
  • An ordered set of instructions to solve a problem
    in finite steps

25
Programming Languages
  • How is it to tell the computers what to do?
  • Can we speak directly to the computers?
  • Computers speak in binary
  • What number system do we usually use?
  • Programming languages
  • Standards (what is the standard for human
    language?)

26
Fortran
  • One of the earliest programming languages
  • Since 1954 and still widely used
  • Latest standard Fortran 2003
  • We will learn Fortran77 (a widely used standard)
  • See http//www.levenez.com/lang/history.html

27
Let's Try a Bit!
  • Open Microsoft Developer Studio
  • Open My Computer
  • Double-click C Drive
  • Double-click MSDEV folder
  • Double-click BIN folder
  • Double-click MSDEV file

28
Creating a Simple Program
  • Create a text file
  • File ? New... ? Text File
  • Save the file
  • File ? Save As...
  • Type the name of the file (lab0) .for extension
    to tell the MSDEV that it is a Fortran program
  • You should see a green mark in the file

29
A Simple Print Program
  • After the green mark type
  • PRINT , 'ICS 101 LAB WORK'
  • END

30
Running a Program
  • Compile the program
  • Build ? Compile Lab0.for
  • Build the executable
  • Build ? Build Proj0.exe
  • Execute the executable
  • Build ? Execute Proj0.exe
Write a Comment
User Comments (0)
About PowerShow.com