0% found this document useful (0 votes)
1 views72 pages

Programming Fundamentals Lecture 1

The document is an introduction to programming fundamentals, detailing the course structure, instructors, and basic computer concepts. It covers the history of computers, types of computers, input and output devices, programming languages, and software development. Additionally, it includes practical assignments and resources for further learning.

Uploaded by

AdeelAkram
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
1 views72 pages

Programming Fundamentals Lecture 1

The document is an introduction to programming fundamentals, detailing the course structure, instructors, and basic computer concepts. It covers the history of computers, types of computers, input and output devices, programming languages, and software development. Additionally, it includes practical assignments and resources for further learning.

Uploaded by

AdeelAkram
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 72

INTRODUCTION TO

PROGRAMMING
Programming Fundamentals (CS-106) FUNDAMENTALS
Course Instructors 2

 Course Instructor
 Engr. Prof. Dr. Adeel Akram
 adeel.akram@uettaxila.edu.pk

 Lab Instructor:
 Mr. Shams ur Rehman
 shams.rehman@uettaxila.edu.pk
What is a computer?

 A computer is a programmable electronic device


that accepts, stores, and processes data according
to specific instructions (programs) to produce
information.
4

BASIC
COMPUTER
CONCEPTS
Computer Operations 5

Input Processing Output

External Storage
Hardware vs. Software 6

 Hardware
 The computer equipment
 Includes printers, monitors, disk drives, etc.
 Software
 Programs which tell the computer what to do
 Examples - word processing, gradebook,
tutorials, games, etc.
7
History of Computers 8

 Charles Babbage - father of computer


 1800’s planned analytical engine
 ENIAC - developed at end of WW II
 1951 - 1963 1st and 2nd generation
 very large, used unreliable vacuum tubes
 1963 - present - 3rd and 4th generation
 smaller, faster - use transistors and integrated circuits
History - Microcomputers 9

 Apple
 First sold in late 1970’s
 Developed by Jobs and Wozniak
 IBM Personal Computers
 First sold in 1981
 Was quickly accepted by businesses
 IBM compatibles soon developed
Computer - Social Impact 10

 Threat to privacy
 Reduce personal interactions
 Displace workers and change workplace
 Create two tiered society
 Computer failures cause great damage
 Artificial Intelligence
 Create a “new life form”
 Machines smarter than their creators
Types of Computers – 11

Personal Computers (PC)


 Also called Microcomputers
 Available in desktop size,
notebook size and handheld
 Can be IBM, IBM Compatible
or Apple
Types of Computers - Minicomputers 12

 Size of filing cabinet

 Used by small and medium size companies and institutions

 Operated by computer specialist

 Terminals allow many people to use


Types of Computers - Mainframes 13

 Very powerful

 Very fast

 Used by large corporations and governmental agencies

 Operated by computer specialist


Types of Computers- Supercomputers 14

 Most powerful
 Fastest
 Most expensive
 Several million dollars each
 Used only by
 Governmental agencies
 Large international corporations
Input Devices - Keyboard 15

 Most commonly used input device

 Ergonomic - fit natural hand placement

 Special keys

 Enter, Function, Ctrl, Alt, Num Lock, Esc


Input Devices - Mouse 16

 Controls cursor on screen

 May be mechanical or
optical

 Most models have a


“wheel” for scrolling
Input Devices - Other 17

 Pointers (replaces mouse on notepads)


 Track point, track ball, touch pad

 Scanner

 Digital camera

 Touch screen

 Voice
Output Devices 18

 Monitor

 Printer

 Disk Drive
 Can also be input device

 Modem
 Can also be input device
Monitors 19

 Made up of tiny elements


called pixels
 Each row of pixels is called
a scan line
 Picture is displayed by an
electronic beam lighting
up certain pixels
Monitors – LCD / LED 20

 Liquid Crystal Display / Light Emitting Diode


 Similar to digital watch
 Used for notebook computers
 Also used in flat screen monitors
 Much thinner than regular CRT monitor
 More expensive than regular CRT monitor
Monitors - Video Card 21

 Processes info to send to monitor


 Amount of video memory may speed up graphic intensive
programs
 2 GB –general purpose
 4~8 GB or more RAM – graphic intensive use

 AGP port can speed up graphics


 3D accelerator card improves graphics
22
Programs 23

 Set of instructions to the computer

 Programming languages
 Machine language
 Assembly language
 Procedural languages
 Basic, Fortran, Cobol
 Object oriented languages
 Visual Basic, C++, C#, Java
Systems Software 24

 Run fundamental operations


 Loading and running programs
 Saving and retrieving data
 Communicating with printers, modems, etc.

 Examples of systems software


 DOS
 Windows 3.1, 95, 98, Me, 2000, and XP
 Unix
 Linux
Applications Software 25

 Helps you to accomplish a certain task

 Examples
 Word processing - memos, reports, etc.
 Spreadsheets - budgets, etc.
 Database - search, sort, select data
 Educational - simulations, practice
 Graphics - charts, diagrams
 Desktop publishing - pamphlets, etc.
Software - Legal Issues 26

 Commercial software
 Can only make backup copies for yourself
 Can only use on one machine at a time
 Site license - use on more that one machine

 Shareware
 Can use - make copies and give to anyone
 Should pay if you continue to use

 Freeware – can copy and use indefinitely


Overview of Software Development 29

 Understand the big picture of Software Development


 Any project involves various stages
 Software Development Life Cycle (SDLC) stages:
 Requirements Gathering
 Design

 Software Development
 Quality Assurance
 Deployment
• You may use your own syntax if
you wish…
66

Text and
Reference
Books

C++ How to Program, 10/e C Programming | KanLabs


- Deitel & Associates, Inc.
Video References 67

 Fundamentals of Programming Languages #1 |


Introduction to Programming Fundamentals –
YouTube (CodeWithPraveen)
 Lecture 1: Introduction to Programing in Urdu |
Programming Fundamental | The Kacs –
YouTube (KACS Learning)
 Lecture 2: (part 1) How to Install Dev C++ on
Windows | Dev C++ | C++ Programming | The
Kacs – YouTube (KACS Learning)
Web References 68

 Home - Dev-C++ Official Website


(https://www.bloodshed.net/)
 Learn C and C++ Programming - Cprogramming.com
(https://www.cprogramming.com/)
 Small Basic
(https://smallbasic-publicwebsite.azurewebsites.net/)
 Scratch - Imagine, Program, Share
 (https://scratch.mit.edu/projects/editor/?tutorial=getS
tarted)
Assignment #1 69

 Install Dev C++ on your computer and create a


program that writes your name following the
steps below:
1. Write Pseudocode Algorithm of your program
2. Draw Flowchart of your program (using shapes)
3. Share code and output of your program

Email: adeel.akram@uettaxila.edu.pk with Subject: Name/Reg - PF Assignment #1


Pseudo Code of name.c

BEGIN
DECLARE name AS STRING
SET name TO “Your Name"
PRINT "My name is " + name
END
Name.c – First Program

#include <stdio.h>

// This program prints the name of the programmer


int main() {
char name[] = "Adeel Akram";
printf("My name is %s\n", name);
return 0;
}
Flow Chart

Start

Declare a string variable name


Assign the value “Your Name" to name

Print "My name is " followed by the value of name

End

You might also like