You are on page 1of 13

‫هللا الرَّ حْ ٰم ِن الرَّ ِحي ِْم‬

ِ ‫ِبسْ ِم‬

Fundamentals
of
Programming
Lecture # 01
Imtiaz Ahmed

1
What is a program
> The term program refers to a set of instructions that instructs a
computer on what to do. Programs are Solutions to Problems and
they are written using programming languages.
A program can instruct a computer to:
> Read/ accept Input data
> Calculate or compare
> Store data
> Write or display Output and communication messages.

The term software refers to a computer program or set of programs


and its associated documentation such as user guide, technical manual

2
Programming

 Programming:

 This refers to the process of writing


computer programs using a
programming language.

 The person who write such instructions


is a programmer.

3
Programming
> What is programming?
- Understand the fact the computers are stupid
- breaking a task down into small steps
- Think always about the reusability.
- Think always about the user (user interface)

> A good programmer is


- Logical
- Persistent
- Perceptive (good at understanding things)
- At least moderately intelligent

4
Programming Languages
 Each natural language has a systematic method of using
symbols of a language. This is dictated by rules of grammar
semantic (structure)and syntax (words and symbols)
 Similarly, computer programming languages are governed by
the structure and syntax. In natural languages one can break
the syntax rule such but we can use inference (guesswork) to
get what the person means.
 However, computer being a machine are receptive to only the
exact syntax rules of the language being used.

5
Types of Programing Languages
A programming Language - is a set of rules that provides a way of
writing instructions that instructs a computer to perform certain
operations.
Programming languages can be classified into two broad categories
namely:
1.Low level languages further classified into two generations namely:
–First Generation- Machine languages
–Second Generation- Assembly languages

2.High-level languages further classified into three generations namely:


–Third Generation- Procedural languages
–Fourth Generation- Problem-oriented languages
–Fifth Generation- Natural languages

6
Introduction
> This course is an introduction to computer
programming
> Focus will be on:
- Problem analysis
- Algorithm design
- Implementation in a modern high-level
programming language
> In this course we will use C++
> Objective
- To develop fundamental computer programming
skills.

7
Grading
- Assignments, Quizzes, Project 35%
- Mid-Term 25%
- Final-Term 40%
> Honesty policy:
- Taking someone else's work and representing it as
your own is lying, cheating, and stealing. All
assignments must be done INDIVIDUALLY. Any
material taken from the Web or other sources must be
properly cited.
> Cheating in assignments/Exams:
- Cheating means one student copying from another or
one student copying from the Internet etc. In both
cases student will get 0 marks

8
Course Material / Reference Material
Reference Materials:
> C++ How to Program, Paul Deitel and Harvey Deitel, Prentice Hall; 7 th
edition (March 4, 2012)

9
Course Contents
> This course covers overview of Computer
Programming, Overview of Structured Programming
Languages, Algorithms and Problem Solving,
Program Development: Analyzing Problem,
Designing Algorithm/Solution, Testing Designed
Solution, Translating Algorithms into Programs,
Fundamental Programming Constructs, Data Types;
Basics of Input and Output, Selection and Decision
(If, If-Else, Nested If-Else, Switch Statement and
Conditional Operators), Repetition (While and For
Loop, Do-While Loop), Break Statement, Continue
Statement, Control Structures, Functions, Arrays,
Pointers, Records, Files (Input-Output), Testing &
Debugging. 10
History of C and C++
> C++ evolved from C
> C evolved from B and BCPL (Basic Combined
Programming Language)
> BCPL was developed in 1967 by Martin Richards
> C uses many important concepts of BCPL and B.
> C initially became widely known as the development
language of the UNIX operating system.
> C++, an extension of C, was developed in the early
1980s at Bell Laboratories
> C++ provides capabilities for object-oriented
programming.

11
Sample C++ {rpgram
#include <iostream>
using namespace std;

int main(){

cout<<"Hello World";

return 0;
}

12
Thanks!
Any question?

13

You might also like