Sie sind auf Seite 1von 38

CS-110

Fundamentals of Computer
Programming

Lecture 0
Course Introduction

Course
Institute of Geographical
Information
Instructor:
Institute
of
Systems
Quratulain Shaf
Geographical

Road Map for


Today

Introduction to CS-110
Course Outcomes
History of Computers
Introduction to Computers
Introduction to Programming
Course contents, books, policies,
homework

CS 110 Fall

Quratulain Shaf

Introduction to CS-110
Course Objectives:

Introduce concepts of Programming


How to Program

Credit Hours:

Theory
Practical = 1
Total
= 4

CS 110 Fall

= 3

Quratulain Shaf

Course
Outcomes
Upon successful
completion of the course, you
will demonstrate competency by being able to:
Understand the basics of computer programming and
its role in solving complex problems.
Demonstrate the fundamental knowledge of C++
programming language by using basic constructs of
C/C++ programming language to write, compile and
debug programs.
Apply the computer programming techniques using
systematic approaches to solve practical problems in
an efficient manner, individually as well as in team.
4
CS 110 Fall 2014

Quratulain Shaf

VIRTUAL
GLOBE

LAND USE
MANAGEMENT

URBAN
PLANNING

GEOINFORMATICS
?
acquiring, analyzing and
visualizing spatial data
CRIMINOLOGY
CS 110 Fall

IN-CAR
NAVIGATION
SYSTEM
Quratulain Shaf

Why study Computer


Programming in
Geoinformatics?

CS 110 Fall

Quratulain Shaf

HISTORY OF
COMPUTERS

CS 110 Fall 2014

Quratulain Shaf

HISTORY OF
COMPUTERS
Charles Babbage
Creator of the Analytical Engine - the first
general-purpose digital computer (1833)

ENIAC - the Analytical Engine was not


built until 1945 (Harvard Mark I)

(courtesy : Wikipedia.org)

Worlds first programmable computer


Could carryout any calculation
CPU was 8 feet tall , 100 feet long and
weighed 30 tons

(courtesy of US Army Historic


Computer Images)

CS 110 Fall

Quratulain Shaf

History of
Computers
Ada (1815-52)
Wrote a program for computing
the Bernoullis sequence on the
Analytical Engine - worlds 1st
computer program

CS 110 Fall

Quratulain Shaf

INTRODUCTION TO
COMPUTERS
A device that can
perform
computations
and make logical
decisions

CS 110 Fall 2014

Quratulain Shaf

CS 110 Fall

Quratulain Shaf

Hardware and
Software
Concept:
The physical devices that a computer is made of
are referred to as the computers hardware. The
programs that run on a computer are referred to
as software

CS 110 Fall

Quratulain Shaf

CS 110 Fall

Quratulain Shaf

System
Software

Name some other


Operating Systems

Application
Software

CS 110 Fall

Quratulain Shaf

A Layered View of the


Computer
Application Software
Word-Processors, Spreadsheets,
Database Software, IDEs,
etc

System Software
Compilers,
Interpreters,Preprocessors, etc.
Operating System, Device Drivers

Machine with all its


hardware
CS 110 Fall 2014

Quratulain Shaf

Can computers think


Even the most powerful
supercomputers require
human interaction
CS 110 Fall

Why??
Quratulain Shaf

1. Setting up the system


2. Installing software
3. Running programs
4. Managing fles
5. Maintaining the syste
CS 110 Fall

Quratulain Shaf

INTRODUCTION TO
PROGRAMMING

Computer has
to be precisely
told what it
needs to do;
otherwise
CS 110 Fall 2014

Quratulain Shaf

Program
Programs are everywhere on the
computer and internet

Even operating systems


are programs

CS 110 Fall

Quratulain Shaf

Program
a precise sequence of steps
to solve a particular
problem
Programs are run or executed (like
OS runs on Hardware like laptop or
cell phone)
Programs can also be run by other
programs (like when we play games
in a web browser)

CS 110 Fall

Quratulain Shaf

HOW PROGRAM
WORKS

Machine Language

CPU only understands


instructions written in
machine language

Machine Language
Instructions are
written in 1s and 0s

CS 110 Fall

Quratulain Shaf

HOW PROGRAM
WORKS

Assembly Language

CS 110 Fall

Machine Language is difficult to


write
Assembly Language uses short
words
Assembler translates assembly
language program to machine Quratulain Shaf

HOW PROGRAM
WORKS

High Level Languages

Allow you to create powerful and


complex programs using easy to
understand words

Per
Pascal
l

Basic

Cobol

Microsoft

.Net

CS 110 Fall

Pytho
n

C++
Quratulain Shaf

Compiler

Interpreter

CS 110 Fall

Quratulain Shaf

We teach C++, Why?


C++ is one of the most popular languages

C++ (originally C)
C++ is portable (runs on Windows,
Macintosh, Unix, Mainframes )
C++ is widely used in industries (almost by
everyone)
C++
C++ is not easy to learn
C

CS 110 Fall 2014

Quratulain Shaf

DevC++
We will be using DevC++ 4.9.9.2
Full-featured Integrated Development
Environment (IDE)
Assignment:
Download and install DevC++ on your PCs from:
http://www.bloodshed.net/dev/devcpp.html

You will write your frst


program today
CS 110 Fall 2014

Quratulain Shaf

Course
Contents
Introduction to course, textbook, policies,

History and evolution of computers and


programming languages
Understanding the programming process,
understanding pseudocode and following
programming methodology
Statements, Variables, Expressions,
Arithmetic operators
Control Statements I
Control Statements II
28
Relational
Operators, logical operators
CS 110
Fall 2014
Quratulain Shaf

Course
Contents
Repeating program instructions

Using counters and accumulators, Pre-test


loops, Post-test loops
Functions, Recursion
Arrays, multidimensional arrays
Structures
Pointers
File I/O
Revision/Project/Demo
29
CS 110 Fall 2014

Quratulain Shaf

Text Books

CS 110 Fall

Quratulain Shaf

Reference
Books

CS 110 Fall

Quratulain Shaf

Policies
Must write your name and reference
number (Regn No) in a test
Ask questions; participate actively in
class
You are encouraged to help each other
with your homework assignments
but you must turn in your own work
If you are found to be cheating, you
will fail at least the assignment / test
and perhaps the entire class
CS 110 Fall

Quratulain Shaf

Contacts

Office hours: Open door


Phone 051- 90854495

email:
quratulain@igis.nust.edu.pk

CS 110 Fall

Quratulain Shaf

Assessment

Class participation will help your grade!


CS 110 Fall

Quratulain Shaf

Homework
No late work will be accepted (unless
arrangements have been made in
advance)
Back up your work. Computer crashes
or lost programs are not valid excuses
for not handing in an assignment.

35
CS 110 Fall

Quratulain Shaf

A Word About Cheating


Cheating is defined by NUST
Discussing homework concepts is fine,
but you must submit your own work.

If you are caught cheating, you


will receive an immediate
FAILURE for that work.

36
CS 110 Fall

Quratulain Shaf

Student Civility
In an effort to make this class
enjoyable for everybody
Please be on time to class!
Please do not talk to your friends and
neighbours in class! It disturbs
everyone, and makes it hard to
concentrate. If you have a question,
just ask me!
Please turn your cell-phones off!
37
CS 110 Fall

Quratulain Shaf

Thank You
The illiterate of the 21st century will not be those who
cannot read and write,
but those who cannot learn, unlearn, and relearn.
--Unknown
CS 110 Fall

Quratulain Shaf

Das könnte Ihnen auch gefallen